Copy .txt files

February 6, 2012 at 03:49:00
Specs: Windows XP
Im trying to copy text files from a directory to a folder but im not able to do it:pls rectify

@echo off
set source=%~dp0\New Folder
set dest=%~dp0
pushd "%source%"
for /f "tokens=*" %%f in (*.txt) do copy %%f "%%a" "%dest%
@echo off & setlocal

New Folder is the place where the txt files are kept and i have to cut the files and paste it in the outer folder

See More: Copy .txt files

Report •

February 6, 2012 at 05:36:03

Report •

February 6, 2012 at 06:56:59

@echo off & setlocal
set source=%~dp0.\New Folder
set dest=%~dp0
pushd %source%
copy *.txt "%dest%" > nul

Replace copy with move if you want to remove the files from the source folder after they are copied.

Report •
Related Solutions

Ask Question