1.

Solve : how to make batch file for all files in faster way?

Answer»

i got 10 TEST files to send over lpt1 (copy 1.txt lpt1)
any better WAY to buld a BATCH file quickly?
because the files name always different and copy /paast those name really consume lots of time<<<" Igot 10 test files to send over lpt1 (copy 1.txt lpt1)
any better way to buld a batch file quickly?
because the files name always different and copy /paast those name really consume lots of time">>

Code: [Select]@echo off
dir /B *.txt > cpfiles.txt

for /f "delims=" %%i in (cpfiles.txt ) do copy %%i lpt1
I have not tested the above code.

Look at for /? for more options.

good luck

if dir /b *.txt > cpfiles.txt gives more files than needed try:

echo 1.txt > cpfiles.txt
echo 2.txt >> cpfiles.txt
.
.
.
Then the above for loop



Discussion

No Comment Found