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
 Appending to a string
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bafaneh

USA
49 Posts

Posted - 10/26/2011 :  8:06:39 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Penn

China
644 Posts

Posted - 11/01/2011 :  03:52:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - Penn on 11/01/2011 03:53:37 AM
Go to Top of Page

bafaneh

USA
49 Posts

Posted - 11/04/2011 :  8:03:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you. This worked!

-Basheer
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