populate csv
Posted: 29 Jan 2017 17:41
I am using the following script to populate a csv file.
What do I need to change so the script will add filename+extension?
Right now only writes the filename.
What do I need to change so the script will add filename+extension?
Right now only writes the filename.
Code: Select all
for %%a in (*.csv) do call :addID "%%~Na" "%%a"
goto :EOF
:addId
@echo off
for /f "usebackq delims=" %%b in (%2) do (
> #.csv echo %%b
goto :next
)
for /r %F in (*.*) do @echo %~nxF > %filename%
:next
for /f "usebackq skip=1 delims=" %%b in (%2) do (
>> #.csv echo objects/%filename%,%filename%,%DATE%%%b
)
move #.csv %2