Page 1 of 1 1
Topic Options
#147034 - 2005-09-02 09:49 AM find the driveletter
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
hi

have anyone a idea how can i find the driveletter from how the script ist start ?

example:

i habe a script .. its on a disk oder an memorystick

the script use a second file in the same folder
but the drivelater is on a disk or an memorystick not the same
i donīt want to edit the script everytime

a bad way is to copy the script temporary to a temp folder on C: and start it there

all ideas are welcome

greeting snake

Top
#147035 - 2005-09-02 09:59 AM Re: find the driveletter
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
The @SCRIPTDIR macro will show you the drive and the dir the script is running from.
So this:

Code:

call @scriptdir + "\otherscript.kix"



Will always call the script from the proper drive.


Edited by Mart (2005-09-02 10:01 AM)

Top
#147036 - 2005-09-02 10:15 AM Re: find the driveletter
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
hi mart u help me again :-)


kix have so match funktion .... but i never find what i need :-)))))

thats exactly what i search THANKS

greeting snake

Top
#147037 - 2005-09-02 10:22 AM Re: find the driveletter
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Happy to help.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#147038 - 2005-09-02 03:38 PM Re: find the driveletter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you say the other files are on the same folder?
well, then just use that.
reference to same folder ".\"

so, instead of:
call @scriptdir + "\otherscript.kix"

use:
call ".\otherscript.kix"
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.061 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org