Page 1 of 1
Relative pathname in Cspro
Posted: August 21st, 2013, 12:32 pm
by htuser
Dear Gregory,
I've already write you about the problem with relative pathname with Cspro.
I would like to know if it's possible to write code with them (relative pathname)
by example with the setfile function.
Thanks for all,
Re: Relative pathname in Cspro
Posted: August 22nd, 2013, 2:27 am
by Gregory Martin
You can use relative path names with the setfile function. It definitely works on the normal Windows file system. I'm not sure if it would work with UNC path names and network drives, but I imagine that it would.
Re: Relative pathname in Cspro
Posted: August 23rd, 2013, 7:00 pm
by htuser
Thanks for your help.
I would like to know if there's a particular syntax for?
Because when i use simple pathname as "\Users\computername\Desktop\foldername" it doesn't work.
Sincerely,
Re: Relative pathname in Cspro
Posted: August 24th, 2013, 9:20 am
by lls
Hi,
can you explain what you are trying to do?
Maybe you need to start from your application folder, something like
\..\PATH\TO\FOLDER
Re: Relative pathname in Cspro
Posted: September 2nd, 2013, 9:40 am
by htuser
Dears Gregory and Ils,
@ Ils, i try to interact more csentry with other windows programs and use the results of some dos commands inside Csentry. By Example, i can write a code to start and close record an interview regarding a part of a questionnaire using tablet automatically.
I can use mac adress to deploy more securely Csentry's application and more...
It's because i try to write code inside cspro to create file and write command inside using
setfile/
filecreate,
filewrite.
About the relative pathname:
I try either
setfile(getm,".\Desktop\relative_pathname\getm.bat",create);
or
setfile(getm,"\..\Desktop\relative_pathname\getm.bat",create);
infortunately, with no results.
I send to you the application for more help from you.
Thanks in advance
Re: Relative pathname in Cspro
Posted: September 3rd, 2013, 5:44 pm
by Gregory Martin
You might want to read the Microsoft help about paths:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Check out the section "Fully Qualified vs. Relative Paths."
Re: Relative pathname in Cspro
Posted: September 3rd, 2013, 8:50 pm
by htuser
Dear Gregory,
I read it, i correct the code and that's work fine.
Thanks once more,