| View previous topic :: View next topic |
| Author |
Message |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Wed Aug 21, 2002 6:24 pm Post subject: Current working directory? |
|
|
Arrrrgh -- I'm having a brain fade.
How do I determine the Current Working Directory?
I want to create a link under New... in a folder's context menu that will create a new, pre-populated INI file at that location.
The link will point to a VDS program that will create the INI.
Alternatively, I want to place a shortcut to the program in a folder and have the new INI created in that folder.
One of the program's functions will be to determine if the INI already exists, so it has to know to "look here" for the file.
How do I find the CWD? |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Wed Aug 21, 2002 6:31 pm Post subject: |
|
|
Well, if you are going to have an inifile created when clicking
on New whatever I assume you are going to have your VDS
program make the file. You can just send it as a command line parameter
to your VDS app. Don't forget if the directory has spaces in it you'll
have to compile the parameters into one. You can use this to do
that
| Code: |
:collect variables
%%filename =
repeat
%%filename = %%filename%1" "
shift
until @not(%1)
%%filename = @trim(%%filename)
|
Does that help? _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Aug 21, 2002 6:33 pm Post subject: |
|
|
@path(%0) gives the dir where your VDS program is located.
@curdir() gives the current directory where Windows is working
from (not the windows dir).
NOTE: @path() includes a trailing backslash, @curdir() doesn't.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Wed Aug 21, 2002 6:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Wed Aug 21, 2002 6:35 pm Post subject: |
|
|
@curdir! Of course! (Told you it was a brain fade.)
Thanks. |
|
| Back to top |
|
 |
|