User Input in Windows batch Programming [duplicate]
Possible Dupli开发者_JAVA百科cate:
User Input Operation in Windows batch Programming
I have three folders on my system and same folders are on the remote system. e.g.
30062011
22062011
15062011
What I want is basically an user input, which will transfer the contents of above folders to other folders of remote system, like if user enters 30062011
, then the contents of this folder (30062011) from my system to the folder (30062011) of remote system should be moved and so on.
Please help.
You can use something like below:
set /P folder=Enter folder name:
Then use %folder%
to copy the entered folder name
PS: You should consider providing sample code of what you had tried. Not just ask questions on what you want accomplished, that is not what Stackoverflow is for.
@echo off
echo.
set /P C=Move all files from which folder name?
move [From path]\%C%\*.* [To path]\%C%\
exit
精彩评论