Im trying to copy text files from a directory to a folder but im not able to do it:pls rectify @echo off
setlocal
set source=%~dp0\New Folder
set dest=%~dp0
pushd "%source%"
for /f "tokens=*" %%f in (*.txt) do copy %%f "%%a" "%dest%
popd
@echo off & setlocalNew Folder is the place where the txt files are kept and i have to cut the files and paste it in the outer folder
Copy or move?
@echo off & setlocal
set source=%~dp0.\New Folder
set dest=%~dp0
pushd %source%
copy *.txt "%dest%" > nul
popd
Replace copy with move if you want to remove the files from the source folder after they are copied.
| « how to make programme tag... | client server multi-threa... » |