Please Help With Command Prompt Button
Moderators: white, Hacker, petermad, Stefan2
Please Help With Command Prompt Button
Hello all. I do believe I'm starting to get the hang of this superb program. I am, however, stuck on a minor issue with creating a custom button to launch the system command prompt within Windows XP.
I have created the button, and pointed it to C:\Windows\System32\cmd.exe
This starts the Command Prompt quite well, with one exception, and that is what I would like some help with, if anyone has the knowledge.
Currently when I start the Command Prompt, it has the Start Path of C:\Windows\System32 .
What I desire is to have the Command Prompt start with the Start Path of the current lister window under focus. In other words, if I am in a lister window of say D:\Games then I would like the Command Prompt to have that start path. Or, if I am in E:\Docs then I would like the Command Prompt to start in that directory.
Is there a way to write this in the Start Path text line of the button customization dialog box?
Thank you very much!!
I have created the button, and pointed it to C:\Windows\System32\cmd.exe
This starts the Command Prompt quite well, with one exception, and that is what I would like some help with, if anyone has the knowledge.
Currently when I start the Command Prompt, it has the Start Path of C:\Windows\System32 .
What I desire is to have the Command Prompt start with the Start Path of the current lister window under focus. In other words, if I am in a lister window of say D:\Games then I would like the Command Prompt to have that start path. Or, if I am in E:\Docs then I would like the Command Prompt to start in that directory.
Is there a way to write this in the Start Path text line of the button customization dialog box?
Thank you very much!!
Namaste
Jag
Jag
Fast!
Hi Leif!Leif wrote:Parameter: %p
Always fast!
¤ In elegant French: toujours prompt ... That does a fine joke!
Now begins the "Insomniacs Club" !
Kind regards, cordialement,
Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
Well, that worked so well, that I'd like to see if I can push the envelope here.
Is there a way to have the selected(read-highlighted) batch file name also be input to the command line of the Command Prompt program?
As it is now, with all your help, it points to the correct current directory, and it would be a dream if it could also have typed in the name of the batch file, for example D:\Games\Sample\example.bat
Would that be possible, and if so, how would I write that one up in the button dialog box?
Many thanks, once more for your patience and guideance!!
Is there a way to have the selected(read-highlighted) batch file name also be input to the command line of the Command Prompt program?
As it is now, with all your help, it points to the correct current directory, and it would be a dream if it could also have typed in the name of the batch file, for example D:\Games\Sample\example.bat
Would that be possible, and if so, how would I write that one up in the button dialog box?
Many thanks, once more for your patience and guideance!!
Possible...
2Jaguarist
* Open the dir >> sub-dir in a pannel, then carry the *.bat file on the command line via Drag & Drop
* Press ENTER or Shift+ENTER (keeps the Dos-box open)
That's all!
Kind regards,
Clo
Hi!for example D:\Games\Sample\example.bat
* Open the dir >> sub-dir in a pannel, then carry the *.bat file on the command line via Drag & Drop
* Press ENTER or Shift+ENTER (keeps the Dos-box open)
That's all!
Kind regards,
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
Thanks guys, but no dice, not yet anyway. The drag n drop, then pressing Return just opened the .bat file in my text editor.
I also tried the %N parameter, but it did the same that the %p did. Both those parameters have the command prompt open in the current directory under focus, but will not include the highlighted file name.
No biggie, I can type it from there, but I was just wondering how far I could go with this button.
I will also take the suggestion to read about the parameters in the manual.
Thanks again, and have a great weekend, all !!
I also tried the %N parameter, but it did the same that the %p did. Both those parameters have the command prompt open in the current directory under focus, but will not include the highlighted file name.
No biggie, I can type it from there, but I was just wondering how far I could go with this button.
I will also take the suggestion to read about the parameters in the manual.
Thanks again, and have a great weekend, all !!
Mouse-lover
Hi!Sheepdog wrote:2Clo
That's a really cool use for 'drag & drop'.
sheepdog
¤ I discovered this because the keyboard-shortcut Ctrl+J or Ctrl+ENTER were missing in the Help!
I'm forced to be a "Mouse-Lover", because I've a problem at my right hand, not a disaster, but painful and annoying...
Thanks,
kind regards,
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
djk wrote:When I've used something like this:
Command: C:\windows\system32\cmd /k
Parameters: %N
It just run the highlighted batch file.
That's the WINNER!! With that setup, I don't even have to press the Enter key when the Command Prompt program comes up.
Now, I'm off to read my manual more closely.
Namaste
Jag
Jag