forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Current working directory?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Wed Aug 21, 2002 6:24 pm    Post subject: Current working directory? Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Wed Aug 21, 2002 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Aug 21, 2002 6:33 pm    Post subject: Reply with quote

@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 Smile

_________________
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
View user's profile Send private message Send e-mail
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Wed Aug 21, 2002 6:35 pm    Post subject: Reply with quote

@curdir! Of course! (Told you it was a brain fade.) Rolling Eyes

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group