Say I have a file, file.txt and I want to copy it into this folder, d:/Folder1, except I need it more than once. When I go CTRL+C the file, it goes file - Copy.txt but when I try to use copy in batch, it says I cannot overwrite the file.

How do I make it is it copies more than once into that folder?

有帮助吗?

解决方案

This batch file will make 100 copies starting at file1.txt to file100.txt

@echo off
for /L %%a in (1,1,100) do copy /b "c:\folder\data\file.txt" "d:\folder1\file%%a.txt"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top