Windows批处理编程中的用户输入操作 [英] User Input Operation in Windows batch Programming
本文介绍了Windows批处理编程中的用户输入操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从用户那里以ddmmyyyy格式输入内容,当用户以这种格式输入日期时,文件将移动到相应的文件夹中.我尝试了以下代码,但失败了.
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 =输入文件夹名称,例如30062011:
SET /p str=Enter the name of the folder e.g. 30062011:
移动C:\ Documents and Settings \ MyPC \ Desktop * _ %str% .pdf S:**%str%**
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%
这篇关于Windows批处理编程中的用户输入操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文