0

Possible Duplicate:
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.

Community
  • 1
  • 1
Mareena
  • 81
  • 2
  • 4
  • 9
  • 2
    Why have you been asking the same question? - http://stackoverflow.com/questions/6605242/user-input-operation-in-windows-batch-programming – manojlds Jul 09 '11 at 21:07

2 Answers2

2

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.

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • Hi Mate, sorry for the inconvinience, I was using the following code, set /P str=Enter Date: move c:\bpm\%str% z:\bpm\%str% I am a new user on Stack, so didn't know about the rules. Please consider it. – Mareena Jul 10 '11 at 08:55
1
@echo off
echo.
set /P C=Move all files from which folder name?  
move [From path]\%C%\*.* [To path]\%C%\
exit
Andriy M
  • 76,112
  • 17
  • 94
  • 154
NGLN
  • 43,011
  • 8
  • 105
  • 200