Added files
|
Original Message
|
Name: 2222
Date: December 6, 2002 at 02:26:15 Pacific
Subject: Added files OS: 98 CPU/Ram: p2
|
Comment: I want to creat a bat file that will creat a log file of files that has been added to a computers "c" drive after a spacific date, eg what files have been added after 20/12/01. thanks!
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: - Uziel -
Date: December 7, 2002 at 21:48:14 Pacific
Subject: Added files |
Reply: (edit)Well I tryed to make a batch-script and guess what: I found out that I have files on My computer that properties says they are Modified: 12. august 2031 05:00:30 !?, others: Modified: 15. januar 2038 12:38:38, & even files that claims to be modified as far as: Modified: 4. desember 2039 05:36:04. Hmm could someone explain that ?? Could it be some kind of virus that messes up the filedates ?? Anyway.. to use the script I made: U MUST be sure U use the correct DATE-FORMAT to the XCOPY32- switch D: (like yy/MM/dd or else) !! To find out and /or change the time-format go to: Controlpanel >Properties for Regional Settings >Short Timeformat >exampel: dd.mm.yy Do ONLY use below script under WIN, but NEVER use it from a pure DOS environment !! ==================FileList.bat=============start=============== @ Mode CON Cols=80 Lines=50 @ Echo OFF ::: Note: NO warranty's "whatsoever", Use ONLY at U'r own risk! Break ON Set PATH=%windir%;%windir%\COMMAND If NOT exist %windir%\COMMAND\nul GoTo _eof cls echo. echo. echo. ÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄ ECHO ÄÄ one moment please ÄÄ ±±±±±±±±±±± now creating "C:\FileList.txt" ±±±±±±±±±±± echo. ÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄ echo. If exist "C:\FileList.txt" ATTRIB -R -A -S -H C:\FileList.txt If exist "C:\FileList.txt" DEL "C:\FileList.txt" ECHO ====================================================>C:\FileList.txt ECHO.Exit|%COMSPEC%/K Prompt $_ -+- Date: $D -+- Time: $T -+- $_|FIND " ">>C:\FileList.txt ECHO ====================================================>>C:\FileList.txt >> C:\FileList.txt ECHO. ::: ECHO.F |XCOPY32.EXE "C:\*.*" "C:\nul" /E /H /D:08.12.2002 /Y /C /L |SORT >>C:\FileList.txt cls If exist "C:\FileList.txt" Type "C:\FileList.txt" |More >>CON echo. ECHO. FINISH, PUSH ANY KEY TO QUIT! pause>nul : _eof If NOT exist %windir%\COMMAND\nul ECHO. If NOT exist %windir%\COMMAND\nul ECHO. !! Aborted, because the COMMAND-folder doesn't exist !! If NOT exist %windir%\COMMAND\nul pause>nul cd\ cls ==================FileList.bat==============end================ Oh.. just right now (actually 1st after being finish writing the above script, arghh!) I found this ok iNFO -HERE-.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: - Uziel -
Date: December 8, 2002 at 02:21:21 Pacific
Subject: Added files |
Reply: (edit)Forget My above script, I revised that script because of the new info I found just after writing it. Now the BELOW script works exellent, check it out.. :-) (Copy/paste/save it as "FileList.bat". Note: ONLY run it in WIN and NOT from DOS!). ====================FileList.bat===============start================= @ Echo OFF ::::::::::: Note: NO warranty's "whatsoever", Use ONLY at U'r own risk! ::::::::::: Break ON Set PATH=%windir%;%windir%\COMMAND If NOT exist %windir%\COMMAND\nul GoTo _eof cls echo. echo. echo. ÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄ ECHO ÄÄ one moment please ÄÄ ±±±±±±±±±±± now creating "C:\FileList.txt" ±±±±±±±±±±± echo. ÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄ echo. If exist "C:\FileList.txt" ATTRIB -R -A -S -H C:\FileList.txt If exist "C:\FileList.txt" DEL "C:\FileList.txt" If exist "%TEMP%.\$FILES$.dat" ATTRIB -R -A -S -H %TEMP%.\$FILES$.dat If exist "%TEMP%.\$FILES$.dat" DEL "%TEMP%.\$FILES$.dat" ECHO #****************************************************#>C:\FileList.txt ECHO.Exit|%COMSPEC%/K Prompt $_# -x- Date: $D -x- Time: $T -x- # $_|FIND " ">>C:\FileList.txt ECHO #====================================================#>>C:\FileList.txt ECHO.# List of files that are new/modified since 08.12.02 #>>C:\FileList.txt ECHO #****************************************************#>>C:\FileList.txt >> C:\FileList.txt ECHO. ::: ECHO.F |XCOPY32.EXE "C:\*.*" "C:\nul" /E /H /D:08.12.2002 /Y /C /L >>"%TEMP%.\$FILES$.dat" ::: ECHO.@PROMPT e0 2f$_rcx$_1$_w0$_q>%TEMP%.\S.BAT %COMSPEC%/E:4096/C %TEMP%.\S.BAT | Debug %TEMP%.\S.BAT>NUL SET C= :LOOP COPY /B %TEMP%.\S.BAT+%TEMP%.\$FILES$.dat %TEMP%.\S>NUL Find /V "/"%TEMP%.\$FILES$.dat SET C=%C%+ IF NOT (%C%)==(+++) GOTO LOOP ::: FOR %%F IN (S.BAT S) DO DEL %TEMP%.\%%F SET C= ::: ::: Type NUL | CHOICE.com /N /CY /TY,1 >nul If exist "%TEMP%.\$FILES$.dat" Type "%TEMP%.\$FILES$.dat" |SORT >>"C:\FileList.txt" ::: Type NUL | CHOICE.com /N /CY /TY,1 >nul ::: ::: UNREM BOTH: "Type NUL | CHOICE....."-lines only if neccessary... ::: (then things goes to fast: that actually may sometimes cause ERRORS) !!! echo. If exist "C:\FileList.txt" Start /MAX "Notepad.exe" "C:\FileList.txt" >nul echo. ECHO. FINISH, AUTO-CLOSING IN 2 SECONDS Type NUL | CHOICE.com /N /CY /TY,2 >nul : _eof If NOT exist %windir%\COMMAND\nul ECHO. If NOT exist %windir%\COMMAND\nul ECHO. !! Aborted, because the COMMAND-folder doesn't exist !! If NOT exist %windir%\COMMAND\nul pause>nul @ Mode CON Cols=80 Lines=50 ::: The 1st above line is ONLY neccessary if the "ANSI.SYS"-driver ::: is loaded in memory, else the DOS window will not close (bug?) !!! cd\ cls ====================FileList.bat================END=================
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: