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
 Change file path
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JonasKlim

Lithuania
36 Posts

Posted - 12/20/2017 :  10:40:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

Could you please help with a code to change file path, since the following code (copied from samples) results in an error:

string fns$, path$=system.path.program$ + "C:\Users\Jonas\OneDrive\Documents\FTMC\Matavimai\2017-09-21\";
path$=;
findfiles fname:=fns$ ext:="*.dat"; // find matching files in 'path$'
int n = fns.GetNumTokens(CRLF); // Number of files found;
n=;

RESULT:
C:\Program Files\OriginLab\Origin2018\C:\Users\Jonas\OneDrive\Documents\FTMC\Matavimai\2017-09-21Invalid file path!
#Command Error!

Best regards,

Jonas

cpyang

USA
1406 Posts

Posted - 12/20/2017 :  3:57:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Your path was not setup right. You should just set it to where you want, no need to combine with system.path.program$ at all, so change first line to


string  fns$, path$="C:\Users\Jonas\OneDrive\Documents\FTMC\Matavimai\2017-09-21\";



CP
Go to Top of Page

JonasKlim

Lithuania
36 Posts

Posted - 12/21/2017 :  04:11:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello CP,

Thank you .

Best regards,

Jonas
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