The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Automated Output Folders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mulvenna

Germany
46 Posts

Posted - 10/18/2013 :  09:00:58 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.6
Operating System: Windows 7

Hi,

I was hoping someone could help me. At the minute I have a script that outputs pdf files to one folder. These graphs are then manually moved to the neccessary folders. I want to automate the entire process but here's my problem. The folders are named in order:

TR0001
|
|
TR9999

but they all have text after the reference number:

TR2015 - "BlaBla This text is never the same"

For each output, Origin can find the reference number from the information it is given but not this extra text. Is there any way I can get the files to go to the correct folder without knowing this information???

Basically, I can get origin to find the entire directory except the middle, highlighted part:

\\Ihitesting\twi_data\testing\TR_____\Testing Request TR2001 - TR2200\TR2015_M274_115kW_WL-LLK_PPAP Performance_PT1\data\post processing\01_Technology_Testing\TR2015_TC01


Any help at all would be great.
Thanks!

greg

USA
1378 Posts

Posted - 10/18/2013 :  2:54:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I don't know what you mean when you say you can "get origin to find the entire directory except the middle .. part"

Here is a script that finds all the folders in the "Testing Request TR2001 - TR2200" folder and parses the different parts of the folder names:

findfolders path:="\\Ihitesting\twi_data\testing\TR_____\Testing Request TR2001 - TR2200";
loop(ii,1,folder.GetNumTokens(CRLF))
{
fld$ = folder.GetToken(ii,CRLF)$;
ty Found folder %(fld$);
ty -l Folder parts :;
loop(jj,1,fld.GetNumTokens("_"))
{
str$ = fld.GetToken(jj,"_")$;
ty -l %(str$)\t;
}
ty;
}

Given a folder, you can also get all the files in that folder as in:
findfiles path:="\\Ihitesting\twi_data\testing\TR_____\Testing Request TR2001 - TR2200\TR2015_M274_115kW_WL-LLK_PPAP Performance_PT1\data\post processing\01_Technology_Testing\TR2015_TC01" ext:="*.*";
loop(ii,1,fname.GetNumTokens(CRLF))
{
file$ = fname.GetToken(ii,CRLF)$;
ty -v Found file %(file$);
}
Go to Top of Page

Mulvenna

Germany
46 Posts

Posted - 10/21/2013 :  03:42:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Greg! That worked perfectly.

What I meant was, in my script, I was using information from the imported ASCII file to compile a file path from various strings (Not a very elegant way of doing it). I didn't realise there was a command to get folder names.

Thanks again, great help!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000