Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.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 - Fatal编程技术网

Batch file 如何重命名附加另一个扩展名的批处理?

Batch file 如何重命名附加另一个扩展名的批处理?,batch-file,Batch File,由于某些原因,我不得不使用批处理文件附加另一个扩展名 递归复制文件夹,附加扩展名(ex.txt) 我的代码是 @for %%f in (cs and another extensions) do ( @xcopy .\folder\*.%%f .\Exporter\*.%%f.txt /s /y ) 此代码更改扩展名。我不想改变它,我想附加.txt ex)test.cs至test.cs.txt

由于某些原因,我不得不使用批处理文件附加另一个扩展名

递归复制文件夹,附加扩展名(ex.txt)

我的代码是

@for %%f in (cs and another extensions) do (
    @xcopy .\folder\*.%%f .\Exporter\*.%%f.txt /s /y
)
此代码更改扩展名。我不想改变它,我想附加.txt

ex)test.cs至test.cs.txt