I am writing a code to accomplish a few things:
The test file looks like this:
Header
"Data Line 1
Data Line 2"
So far I have this which works for the first item:
```
@echo off
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
set YYYY=%dt:~0,4%
set MM=%dt:~4,2%
set DD=%dt:~6,2%
set stamp=%MM%%DD%%YYYY%
move "C:\test\*.csv" "C:\test\test_%stamp%.txt"
```
@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
set YYYY=%dt:~0,4%
set MM=%dt:~4,2%
set DD=%dt:~6,2%
set stamp=%MM%%DD%%YYYY%
for %%a in ("c:\test\*.csv") do (
(for /f "usebackq skip=1 delims=" %%b in ("%%a") do (
set "line=%%b"
echo !line:"=!
))>"C:\test\test_%%~na_%stamp%.txt"
)
Completely untested and may produce unwanted results depending on the exact file contents (which you didn't show us).