Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.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_Windows 10 Desktop - Fatal编程技术网

Batch file 批处理文件,根据输入信息创建名称为的文件夹,然后将另一个文件夹的内容复制到该文件夹中

Batch file 批处理文件,根据输入信息创建名称为的文件夹,然后将另一个文件夹的内容复制到该文件夹中,batch-file,windows-10-desktop,Batch File,Windows 10 Desktop,所以我要做的是创建一个批处理文件,将现有文件夹的内容复制到新创建的文件夹中。我已经能够使用MKDIR来创建一个新文件夹,然后将其复制到新文件夹中并手动重命名 是否可以让一个批处理文件询问信息,然后重命名文件本身并将所需信息复制到新文件夹中?这个问题非常不清楚,实际上离题了,但如果我理解正确,您想要类似的内容 @echo off cls set /p "newfolder=Type a name of the folder you want to create : " cls set /p "so

所以我要做的是创建一个批处理文件,将现有文件夹的内容复制到新创建的文件夹中。我已经能够使用MKDIR来创建一个新文件夹,然后将其复制到新文件夹中并手动重命名


是否可以让一个批处理文件询问信息,然后重命名文件本身并将所需信息复制到新文件夹中?

这个问题非常不清楚,实际上离题了,但如果我理解正确,您想要类似的内容

@echo off
cls
set /p "newfolder=Type a name of the folder you want to create : "
cls
set /p "source=Type the source path of files to copy to %newfolder%: "
mkdir "%newfolder%"
xcopy "%source%\*" "%newfolder% /Y
pause

索塔。对不起,因为保密协议,我在这里只能放些什么。我明天会试试,然后再打给你。非常感谢。