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
 Appending to a string

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
bafaneh Posted - 10/26/2011 : 8:06:39 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1
Operating System:win7

Hi,

I want to import 21 files that end like this:
"PDF-#" (where # is from 0-20.)

I am using findfiles ext:="PDF*.csv" to import the files but when it imports the files, (impmode=3, so it starts a new book each time) they are not ordered from 0-20, they go: 0,1,10,11,20,2,3,4,5,6,7,etc, because I didn't number the files 01,02,03,etc.

So instead of re-naming all my files, (because I have many more than 20 in reality) I want to know how can I append a variable to the string "PDF*"?

I.e. I want to have something like this:

findfiles ext:="PDF-*"+$(ii)+".csv"

where I loop ii from 1 to "lastfile" so it imports in the "correct" order.


Thanks for your help,
Basheer
2   L A T E S T    R E P L I E S    (Newest First)
bafaneh Posted - 11/04/2011 : 8:03:37 PM
Thank you. This worked!

-Basheer
Penn Posted - 11/01/2011 : 03:52:40 AM
Hi Basheer,

You can use some scripts like:

string str$ = PDF-*$(ii).csv;  // extension, using wildcard *
findfiles path:="Path of data files" ext:=str$;  // the path needs to be a valid one
impasc;  // import the files found


Penn

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