absolute/relative path nightmare

Bob Hartley rev at armbase.com
Tue May 24 15:32:55 EDT 2005


Hi All.

I am completely baffled by this.
OK I have a script in an app that looks for three files in a folder.

EG master folder called armbase with an app called armbase.exe
in folder armbase ther eis a folder called components.
Within the folder called components ar ethe three files I want to access. 
One is called armbase.txt one called armbase.xdf and another called 
PDATconc.exe (I run PDATconv.exe from the shell command.

OK here is the problem.

If my script points to the full path eg in this case
on mouseUp

   set the hideConsoleWindows to true
   put "c:\Armbase\Components\PDATconv.exe /I" && quote & 
"c:\Armbase\Components\Armbase.xdf" & quote into mycommandline
-- the above is in one line it is just truncated by wordwrap in my email 
program
   get shell(mycommandline)
   put url("file:c:\Armbase\Components\Armbase.txt") into tFile
   repeat for each line tLine in tFile
etc etc etc

Then the script works fine.

However if I use truncated versions (what I think of as relative paths) the 
app does not run the externals.

   set the hideConsoleWindows to true
   put "Armbase\Components\PDATconv.exe /I" && quote & 
"Armbase\Components\Armbase.xdf" & quote into mycommandline
-- the above is in one line it is just truncated by wordwrap in my email 
program
   get shell(mycommandline)
   put url("file:Armbase\Components\Armbase.txt") into tFile
   repeat for each line tLine in tFile

or use this version

   set the hideConsoleWindows to true
   put "\Components\PDATconv.exe /I" && quote & "\Components\Armbase.xdf" & 
quote into mycommandline
-- the above is in one line it is just truncated by wordwrap in my email 
program
   get shell(mycommandline)
   put url("file:\Components\Armbase.txt") into tFile
   repeat for each line tLine in tFile

or use this version

   set the hideConsoleWindows to true
   put "Components\PDATconv.exe /I" && quote & "Components\Armbase.xdf" & 
quote into mycommandline
-- the above is in one line it is just truncated by wordwrap in my email 
program
   get shell(mycommandline)
   put url("file:Components\Armbase.txt") into tFile
   repeat for each line tLine in tFile


I thought that if the folder was in the same directory as the app then it 
would work. I need this to work because it would save lots of problems with 
running multiple versions.

Any ideas?
Cheers
Bob 


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.16 - Release Date: 24/05/2005




More information about the use-livecode mailing list