0

I have a folder named Images and I have a Run.exe. Now when I drag and drop the Images folder on the Run.exe, it will execute the program.

Please help me with some good working example ASAP so that I can complete the same in time. I have only 2 days left to complete this. Would be great if someone could help me in this issue.

Smi
  • 13,850
  • 9
  • 56
  • 64
khbasha
  • 1
  • 1
  • For an urgent question, yours is a bit too unclear. For instance, what does `Run.exe` have to do with batch commands that your title speaks about? However, you could start by having a look at [this question](http://stackoverflow.com/questions/1243240/drag-and-drop-batch-file-for-multiple-files "Drag and drop batch file for multiple files?"), which at first sight seems more or less close to what you want. – Andriy M Dec 26 '11 at 14:31

1 Answers1

2

Your question is not clear to me. Did you say you want to create a batch file which would execute a command when you drag and drop the Images folder on the cmd window? In that case:

@echo off
cls
echo:Drag and drop the folder here:
set /p input=
rem Press enter after drag and drop.
rem X:\Y\Z\Images would be your Images folder.
if %input% == X:\Y\Z\Images goto :f
:f
rem The command to be executed goes below.
Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98