Shell Path Problems
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Shell Path Problems
Hi.
Trying to launch a bat file with a shell command from an exe in a folder in windows.
The exe is located C:\Program Files\mp3tool
The bat file is located C:\Program Files\mp3tool\Library
get shell("C:\merge.bat") used to work when the exe and bat file were located in the C:\ directory but now I cannot get the bat file to lauch a all.
I've tried a number of combinations,backslashes but none I tried will execute the bat file.
set the hideConsoleWindows to true
get shell ("C:/Program Files/mp3tool/Library/merge.bat")
Any help would be greatly appreciated.
EDIT: I just tried to put the exe and .bat file together in a new directory, C:/Test, and it ran fine.....but the path C:/Program Files will not work? I don't know what's happening???
Thanks
Bidge
Trying to launch a bat file with a shell command from an exe in a folder in windows.
The exe is located C:\Program Files\mp3tool
The bat file is located C:\Program Files\mp3tool\Library
get shell("C:\merge.bat") used to work when the exe and bat file were located in the C:\ directory but now I cannot get the bat file to lauch a all.
I've tried a number of combinations,backslashes but none I tried will execute the bat file.
set the hideConsoleWindows to true
get shell ("C:/Program Files/mp3tool/Library/merge.bat")
Any help would be greatly appreciated.
EDIT: I just tried to put the exe and .bat file together in a new directory, C:/Test, and it ran fine.....but the path C:/Program Files will not work? I don't know what's happening???
Thanks
Bidge
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
When working with files inside Revolution, you need to use slashes as path separators; but when you're using a function like shell you ned to use the native path separator syntax.
Until you're sure the shell command works, you're better off setting the hideConsoleWindows to false as you may receive a clue about why something isn't working.
Depending on the batch command processor (cmd.exe or command.com), you may have to put quotes around paths that contain spaces. So if changing the path separator wasn't enough, try this.
Jan Schenkel.
Code: Select all
set the hideConsoleWindows to false -- true
get shell ("C:\Program Files\mp3tool\Library\merge.bat")
Depending on the batch command processor (cmd.exe or command.com), you may have to put quotes around paths that contain spaces. So if changing the path separator wasn't enough, try this.
Code: Select all
set the hideConsoleWindows to false -- true
put quote & "C:\Program Files\mp3tool\Library\merge.bat" & quote into tCommand
get shell(tCommand)
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com