Hi friends,
I´ve written these batchfile to monitor my Harddisks. The Problem ist,
that
the File "date-datenzuwachs.txt" has a Linefeed at the end of each day...
Could anyone help to delete this linefeeds with this file?
Carsten
------------
:datum_erstellen
for /f "delims=##" %%i in ('date /t') do set datum=%%i
for /f "delims=##" %%i in ('date /t') do set monat=%%i
for /f "delims=##" %%i in ('date /t') do set jahr=%%i
for /f "delims=##" %%i in ('date /t') do set tag=%%i
echo ----------------------------
set datum=%datum:~0,2%.%datum:~3,2%.%datum:~6,4%
set tag=%tag:~0,2%
set monat=%monat:~3,2%
set Jahr=%jahr:~6,4%
echo %jahr%-%monat%-%tag%
rem ################## C Laufwerk ##############
set sicherungslaufwerk=c
set
logfile=c:\batch\logbuch\%Jahr%-%Monat%-datenzuwachs-LW-%sicherungslaufwerk%.txt
dir %sicherungslaufwerk%:>%temp%\messung1.txt
echo %date% >>%logfile%
find "Bytes frei" %temp%\messung1.txt>>%logfile%
:Datenaufbereitung
%toolspfad%\change.exe c:\zuwachs.txt "----------" ""
rem %toolspfad%\change.exe c:\zuwachs.txt "%temp%\MESSUNG1.TXT" ""
%toolspfad%\change.exe c:\zuwachs.txt
"C:\DOKUME~1\ADMINI~1\LOKALE~1\TEMP\MESSUNG1.TXT" ""
%toolspfad%\change.exe c:\zuwachs.txt " Bytes frei" ""
%toolspfad%\change.exe c:\zuwachs.txt " Verzeichnis(se)" ""
%toolspfad%\change.exe c:\zuwachs.txt ", " ";"
%toolspfad%\change.exe c:\zuwachs.txt "." ""
%toolspfad%\change.exe c:\zuwachs.txt ":" "."
%toolspfad%\change.exe c:\zuwachs.txt " " ""
-----


|