Page 1 of 1
"Start directory" wrong
Posted: Wed May 20, 2009 1:25 pm
by tireless
I set the "Execute" to:
Command="%f", Working directory=%d
Then I opened C:\Test.bat, the code is @cd&pause, and press Ctrl+F5, but the result is C:\WINDOWS\System32, not C:\
Bug?
Posted: Wed May 20, 2009 4:05 pm
by Surveyor
tireless,
Your example is
almost correct, but you are using Execute a little wrong. %F is a
parameter to a command, not a
command by itself. Try this:
- keep Test.bat, as before, in C:\
- change execute setup:
Command= C:\test.bat
Working directory= %d
- now open another file (anywhere) for editing and do Ctrl+F5. Execute should run the batch file (which displays the folder), but use the folder where the current file came from as its working directory.
Cheers!
Posted: Thu May 21, 2009 2:02 am
by tireless
I want execute current opened file, not a specify file, so I must use
"%f". This problem is similar to:
If you double-click C:\WINDOWS\System32\cmd.exe, then
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\WINDOWS\system32>d:
D:\>c:
C:\WINDOWS\system32>
This is not a big problem, I can put .bat file not in the drive root, that's ok.
Posted: Thu May 21, 2009 2:29 pm
by Instructor
tireless
Command: %f
Working directory: %d\
Posted: Thu May 21, 2009 4:28 pm
by tireless
Instructor wrote:tireless
Command: %f
Working directory: %d\
Thanks

Posted: Wed Jun 10, 2009 9:52 am
by tireless
Instructor wrote:tireless
Command: %f
Working directory: %d\
Can't execute
D:\(Test).bat. Change Command to "%f", can fix it.