Set variable as input without pressing Enter?

June 6, 2011 at 14:51:07
Specs: Windows 7
(This is for XP btw)

Is it possible, in batch, to set user input, such as a file being dragged on to the window, as a variable without pressing enter?

i.e. Drag a file onto the window, and go to next line in the code? (after setting the variable, of course)

This is what I have right now:

set ft=%msg:!ft =%>NUL
set/p one=^Drag the file here and press enter.
pushd %server%\lockfolder

if exist ft goto nexter
md ft
if exist %CD%\ft\%ft% goto nexter2
md %CD%\ft\%ft%

copy %one% %CD%\ft\%ft%
echo "%user%">%ft%.ft
echo File Sent.
PING -n 1 -w 2000 >NUL
goto message

Help is very appreciated :)

See More: Set variable as input without pressing Enter?

Report •

June 7, 2011 at 09:40:24
NO, what you want to achieve is not possible in plain batch since batch scripts can handle textual input only, i.e. they do ignore and can't interact with GUI.

Report •
Related Solutions

Ask Question