开发者

User Input Operation in Windows batch Programming

开发者 https://www.devze.com 2023-03-18 01:49 出处:网络
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.

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

精彩评论

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