I have a batch file that checks in an item and checks it out, It works fine but Is it possible to make a VBS that would turn my .txt file to a .csv so it is easier to read or to make the batch file directly output it to a .csv file?
My issue is I need to convert the .txt/.log to a .csv.
The Batch file
@echo off
title Checkin
color 0a
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
cls
:home
cls
call :ColorText 0b "---------------------------------------"
echo.
call :ColorText 74 "- Welcome -"
echo.
call :ColorText 0b "---------------------------------------"
echo.
call :ColorText 0a " Ready, Awaiting Scan... "
echo.
set /p scan=
cls
call :ColorText 0a "- Please Wait... -"
echo.
echo %time% %date% >>%scan%.log
echo %scan% %date% %time% >>master.xml
ping localhost -n 3 >nul
echo.
call :ColorText 0a "- Success! -"
echo.
ping localhost -n 2 >nul
goto :home
:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
The Output:
9:27:14.94 Tue 10/20/2015
9:27:22.65 Tue 10/20/2015
9:28:37.00 Tue 10/20/2015
I need the Spreadsheet to look like:
Date | Time
DDMMYYYY | HHMMSS