Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At work we constantly write CMD batch scripts that will take one, two, or three folders as parameters.

As sometimes the end users would be interested in using those scripts, and as is it long, boring, error-prone and fastidious to type in cmd a command-line with three folder paths as arguments I would like to be able to do like this on Linux:

my_destination_folder="$(zenity --folder-selector --title "choose your folder")"

with some tool like:

FOR /F "usebackq tokens=*" %%G IN (`XXX.exe`) do SET my_destination_folder=%%G

Do you know any simple tool that can be my XXX.exe?

Possibly a standalone, minimalistic tool...

Thank you

share|improve this question
1  
You can drag and drop files/folders onto a batch script icon to execute the script with those items as parameters. No typing required. –  Chris Nava Jul 29 '11 at 14:24
    
Yes I know. It even insert appropriate quotes, but still you must not forget to type spaces between arguments –  Benoit Jul 29 '11 at 14:32
    
No. Try this, make a batch file on your desktop that contains echo %1 echo %2 etc.. then select and drag a few folders onto it's icon on the desktop. –  Chris Nava Jul 29 '11 at 15:36
    
I mean that the order is important. Thus I don't drop more than one folder at the same time –  Benoit Jul 29 '11 at 15:45
    
I would think that an AutoIt program could be made for this, where a dialogue box would instruct the user to click on the three required folders in turn. –  paradroid Jul 29 '11 at 18:37

3 Answers 3

up vote 2 down vote accepted

I would think that an AutoIt program could be made for this, where a dialogue box would instruct the user to click on the three required folders in turn.

share|improve this answer

Seemed like an interesting idea so I made another one for you :)

Here is your XXX.exe: Link

Source code is included.

enter image description here

enter image description here

share|improve this answer
    
Thank you! This one will be great for people having the .NET frameword installed. Unfortunately some of our users won't. Still, +1 for it. –  Benoit Jul 29 '11 at 14:53
    
To those wishing to re-use this code, it requires a custom FolderOpenDialog class from the .NET zip library: dotnetzip.codeplex.com –  John T Jul 29 '11 at 15:02

I found Wizard Apprentice. Still, it does not directly open a file selection dialog, you have to click a browse button.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.