Relative pathname in Cspro

Discussions about CSEntry
Post Reply
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Relative pathname in Cspro

Post 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,
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Relative pathname in Cspro

Post 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.
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Relative pathname in Cspro

Post 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,
G.VOLNY, a CSProuser from Haiti, since 2004
lls
Posts: 109
Joined: December 6th, 2011, 3:11 pm
Location: Geneva, Switzerland

Re: Relative pathname in Cspro

Post 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
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Relative pathname in Cspro

Post 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
Attachments
relative_pathname.zip
(4.99 KiB) Downloaded 391 times
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Relative pathname in Cspro

Post 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."
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Relative pathname in Cspro

Post by htuser »

Dear Gregory,
I read it, i correct the code and that's work fine.
Thanks once more,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply