Вопрос

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