I am having some troubles with the following code
Code: Select all
@echo off
REM HERE WE ARE Making the List.txt that contains all the files that will be patched with the Patcher.
set LOCAL_RESCLIENT_DIR=e:\folder\Resclient
CD %LOCAL_RESCLIENT_DIR%
setlocal EnableDelayedExpansion
echo Ver:24 >%LOCAL_RESCLIENT_DIR%\list.txt
echo C:\\RESCLIENT>>%LOCAL_RESCLIENT_DIR%\list.txt
REM echo. >>%LOCAL_RESCLIENT_DIR%\list.txt
set "base=%CD%"
set "base=%base:*:=%\"
for /R %%a in (*.*) do (
for /F "tokens=1-5 delims=/-. " %%b in ("%%~Ta") do set "dateTime=%%d-%%c-%%b %%e%%f"
set size= %%~Za
set name= %%~PNXa
echo !dateTime! !size:~-10! !name:%base%=!>>!LOCAL_RESCLIENT_DIR!\list.txt
)
What it does is creating an list.txt that has the following text in it
Code: Select all
2014-05-23 16:47 0 file.a
2014-05-24 09:27 63 list.txt
etc...
Its in an specific format cause the file will be read from an c++ program.
Now when i open the c++ program i get an error that the file is not found. This is due the fact that the Batch file
is adding an Non Printable character (DLE)(Data link Escape) ASCII 016
Could someone explain to me why this is happening?
With kind regards