AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages! You are not logged in. Login here for full access privileges. |
Previous Message | Next Message | Back to VBBS/VADV How-To <-- <--- | Return to Home Page |
|
||||||
From | To | Subject | Date/Time | |||
Doug Connor | Admiral Wilson | Renaming files with a date in bat file |
June 28, 2007 9:46 AM * |
|||
Admiral Wilson -> All wrote: AW> How do I rename a file to something like todays date, 06272007.log inside a AW> batch file? I wish to archive my bbs logs into the file area with vupload. AW> Thanks Well it seems I have the most complicated way? I run this batch to creat date flag files and/or set envars. the .com files are real small And I found them in a batfile helper file area. I thought they were at http://vtdl.net/share/ac_admin they werent but now are there. I've ru this for years and tweeked and tweeked to the way I like Caution this bat writes its files to the current dir and also deletes the current versions that exists in the dir. ================================================ @echo off rem 38.bat rem call 38.bat nofiles to set envars only rem called from other bats to use envars (date dow dom moy month year) rem also run once a day to write files for if exist checks. set path=%path%;c:\util :dow dow for %%f in (0 1 2 3 4 5 6) do if errorlevel %%f set dow=%%f if (%1)==(nofiles) goto dom del *.dow echo %dow%>%dow%.dow :dom dom for %%f in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31) do if errorlevel %%f set dom=%%f if (%1)==(nofiles) goto moy del *.dom echo %dom%>%dom%.dom :moy moy for %%f in (1 2 3 4 5 6 7 8 9 10 11 12) do if errorlevel %%f set moy=%%f if (%moy%)==(1) set month=jan if (%moy%)==(1) set mont=01 if (%moy%)==(2) set month=feb if (%moy%)==(2) set mont=02 if (%moy%)==(3) set month=mar if (%moy%)==(3) set mont=03 if (%moy%)==(4) set month=apr if (%moy%)==(4) set mont=04 if (%moy%)==(5) set month=may if (%moy%)==(5) set month=05 if (%moy%)==(6) set month=jun if (%moy%)==(6) set mont=06 if (%moy%)==(7) set month=jul if (%moy%)==(7) set mont=07 if (%moy%)==(8) set month=aug if (%moy%)==(8) set mont=08 if (%moy%)==(9) set month=sep if (%moy%)==(9) set mont=09 if (%moy%)==(10) set month=oct if (%moy%)==(10) set mont=10 if (%moy%)==(11) set month=nov if (%moy%)==(11) set mont=11 if (%moy%)==(12) set month=dec if (%moy%)==(12) set mont=12 if (%1)==(nofiles) goto year del *.moy echo %moy%>%moy%.moy echo %month%>%month%.moy :year yr for %%f in (0 1 2 3 4 5 6 7 8 9 96 97 98 99) do if errorlevel %%f set year=%%f if (%1)==(nofiles) goto date del *.yea echo %year%>%year%.yea echo %moy%-%dom%-%year%>date :date set date=%moy%-%dom%-%year% goto end :end =========================================== -- np: Rod Stewart - Greatest Hits - H:\music\rock\Rod Stewart\Greatest Hits\I Don't Want To Talk About It(6).mp3 Playing at 192 Kbps 44 Khz --- Mozilla Thunderbird 1.0.6 (Windows/20050716) * Origin: <The Harbinger Jamnntpd news://vtdl.net> (63:63/1) |
||||||
|
Previous Message | Next Message | Back to VBBS/VADV How-To <-- <--- | Return to Home Page |
Execution Time: 0.0157 seconds If you experience any problems with this website or need help, contact the webmaster. VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved. Virtual Advanced Copyright © 1995-1997 Roland De Graaf. |