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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Automated Output Folders

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Mulvenna Posted - 10/18/2013 : 09:00:58 AM
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!
2   L A T E S T    R E P L I E S    (Newest First)
Mulvenna Posted - 10/21/2013 : 03:42:07 AM
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!
greg Posted - 10/18/2013 : 2:54:36 PM
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$);
}

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000