Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Script to detect *.old files. how?
Name: pkokkinis Date: December 22, 2005 at 10:55:58 Pacific OS: WinXPsp2 CPU/Ram: P4/1024
Comment:
I have a program on my pc that creates .old files every 2-7 days on random. I would like to move the newly created .old files so they don't get overwritten by newer .old files. Any ideas? tia. pete.
Name: Ed in Texas. Date: December 23, 2005 at 02:26:30 Pacific
Reply:
pkokkinis, rather than have the script create a .old file, what would happen if you have it create a .old(x) file and increment x each time? That should create a unique file and prevent overwriting. HTH. Ed in Texas.
0
Response Number 2
Name: Mechanix2Go Date: December 23, 2005 at 02:52:53 Pacific
Reply:
Hi Ed,
You think like I do.
I wrote this a few days ago. I tend to stay with 8.3 file naming. Old dog; new tricks, y'know.
::===== SEQname.bat if exist backupC.zip ren backup.zip nackupD.zip if exist backupB.zip ren backup.zip nackupC.zip if exist backupA.zip ren backup.zip nackupB.zip if not exist backupA.zip ren backup.zip backupA.zip :: DONE
Merry Christmas
If at first you don't succeed, you're about average.
M2
0
Response Number 3
Name: pkokkinis Date: December 24, 2005 at 20:55:28 Pacific
Reply:
very nice M2 that's exactly what i was looking for. Thanks alot and Merry Christmas to you as well!
Pete
0
Response Number 4
Name: pkokkinis Date: December 30, 2005 at 13:27:20 Pacific
Reply:
OK, I finally got a chance to work on this before year end. Here it is for anyone interested. I like to through in a ping or two just to give the previous cmd a second breather. (there's three lines below)
if exist D:\SUPERAPP\LOGS\*.old mkdir "D:\SUPERAPP\LOGS\Archived Logs\%date:~10,4%-%date:~4,2%-%date:~7,2%\"
Summary: Long time ago I had this problem that Disk Cleanup hangs when trying to compress old files: I followed the solution at: http://support.microsoft.com/default.aspx?scid=kb;en-us;812930 and I was sucess...
Summary: By mistake I notices that on my disk cleanup there is a check mark to compress old files, is there anyway to uncompress them, I don't want them compressed. ...
Summary: I cannot figure out how to delete old files based upon the last time they were accessed. I can delete them by age but that does not help, there are some 2 year old ones I need and some from this week ...