Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如何提示用户输入并在批处理文件中的其他位置使用输入_Batch File_Parameter Passing - Fatal编程技术网

Batch file 如何提示用户输入并在批处理文件中的其他位置使用输入

Batch file 如何提示用户输入并在批处理文件中的其他位置使用输入,batch-file,parameter-passing,Batch File,Parameter Passing,我对批处理脚本非常陌生。我试图提示用户“输入包含要转换文件的目录路径:”。一旦他们输入我想提示他们“输入目录路径以保存转换后的文件:”。“我的代码”当前提示第一个问题,但在用户可以输入任何内容之前关闭。请发布您的代码 set /p "SourcePath=Enter directory path containing files to be converted: " echo %SourcePath% set /p "TargetPath=Enter directory path to save

我对批处理脚本非常陌生。我试图提示用户“输入包含要转换文件的目录路径:”。一旦他们输入我想提示他们“输入目录路径以保存转换后的文件:”。“我的代码”当前提示第一个问题,但在用户可以输入任何内容之前关闭。

请发布您的代码
set /p "SourcePath=Enter directory path containing files to be converted: "
echo %SourcePath%
set /p "TargetPath=Enter directory path to save files to once converted: "
echo %TargetPath%
pause