开发者

User Input Operation in Windows batch Programming

I want to take input from the user in ddmmyyyy format and when user enters the date in this format then files would move to the respective folder. I tried in the following code but failled.

SET /p str=Enter the name of the folder e.g. 开发者_StackOverflow社区30062011:

move C:\Documents and Settings\MyPC\Desktop*_%str%.pdf S:**%str%**


What is failing? Move or accepting user input?

I tried following, and I am able to read the user input

@echo off
set /P theuserinput="Enter the filename: "

echo %theuserinput%
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜