I was writing a windows batch script to convert pipe delimited file to comma delimited. When i run it for a single file it does the conversion but when I am running it for the files in a folder it does not.
I have the code written for single file but it does not loop thru the folder..
@echo off
set "INPUT=%C:\temp\source\*.csv"
set "OUTPUT=%C:\temp\dest\"
setlocal EnableExtensions DisableDelayedExpansion
> "%OUTPUT%" (
for %%F in (%*) do
(
delims^=^ eol^= %%L in ("%INPUT%") do (
set "LINE=%%L"
setlocal EnableDelayedExpansion
echo(!LINE:^|^=,!
endlocal
)
)
)
endlocal
exit /B
i want to run the script on all the files in the folder