::@echo off
:: process each txt file in SourcePath directory
:: via SED to remove formfeed character writing
:: updated file to TargetPath directory.
::
:: NOTE: Bypasses any files which already exist
:: in TargetPath
setlocal
set SourcePath=dir1
set TargetPath=dir2
for /f "tokens=* delims=" %%V in ('dir /a-d /b %SourcePath%\*.txt') do (
if not exist %TargetPath%\%%V (
sed "s/\x0C//g" <%SourcePath%\%%V >%TargetPath%\%%V
)
)
|