Computing.Net > Forums > Disk Operating System > Batch File Drag and Drop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Batch File Drag and Drop

Reply to Message Icon

Name: Adam
Date: February 12, 2002 at 22:22:34 Pacific
Comment:

Okay, let's say that there's an exe called "Program" and you can apply files with it using a command switch, like this:

Program.exe -file example.tst

So it would run Program.exe using the example.tst file. Now let's say that I had a whole bunch of "tst" files and I wanted to make it so that I could drag and drop one of the "tst" files onto a batch file and the batch file would then run Program.exe using whatever file I dragged and dropped. What would the batch file have to look like? I hope that isn't too confusing. Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: bundat
Date: February 13, 2002 at 00:14:47 Pacific
Reply:

try:

::start
program.exe %1
::end

i am not sure if this will work.


0

Response Number 2
Name: Adam
Date: February 13, 2002 at 08:09:05 Pacific
Reply:

Yeah, I did try that before I made the post on this board and it didn't work, which is why I made the post.


0

Response Number 3
Name: Michael
Date: February 13, 2002 at 14:10:37 Pacific
Reply:

You can't do that in batch... Try visual basic script. Do a google search for windows scripting host.

-Michael


0

Response Number 4
Name: Secret_Doom
Date: February 13, 2002 at 20:58:12 Pacific
Reply:

Michael is right, I don't think that is possible in batch.

However, you could make a script to generate a numbered list, so you would only have to access that batch file and type a number in order to run the program with a specific file.

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 5
Name: Beretta
Date: April 30, 2002 at 04:31:00 Pacific
Reply:

::start
program.exe %1
::end

that works in Win2000!


0

Related Posts

See More


Reply to Message Icon

Please Help me copy! DOS HEX Editor



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Batch File Drag and Drop

Batch file probs in W2k and XP www.computing.net/answers/dos/batch-file-probs-in-w2k-and-xp/8341.html

create backup cd using batch file www.computing.net/answers/dos/create-backup-cd-using-batch-file/10385.html

Batch files date and time www.computing.net/answers/dos/batch-files-date-and-time/10101.html