I have got a small script pushing text to a text file in windows, inside a .bat file.
@REM Set ups %date variable
@REM First parses month, day, and year into mm , dd, yyyy formats and then combines to be MMDDYYYY
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%
REM :%ldt:~12,6%
REM For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
echo %ldt% ^| %*>>"C:\Users\Julien\Box Sync\Deversoir.txt"
I call it in a cmd windows with
deversoir.bat "text to put in file"
I have trouble when the text contains accent : the resulting text file (deversoir.txt) has no accent, but replacement values ("é" -> "," ; "è" -> "Š" ; ...)
How can I do this ?