SigiSoft
 
DelOlder
 


SigiSoft -

Software, Servcies & Solutions
Urbarialgasse 1
7034 Zillingtal
Austria

Phone: 
+43 699 11323576

 
 
 
 
 
 
 
 

DelOlder is a Utility to delete old files.

(needs .NET libary 2.0 from Microsoft)


DelOlder is a windows - commandline utility (DOS-Box) to delete older or obsolete files. It can be used for deleting e.g. old backups, old webcam images or old logfiles.

Download here

Warning:

This tool deletes files without confirmation.
It does not use the windows thrash box.
Use the TEST-Mode (/Test) before actually implementing the tool into production systems.

License:

Free for personal use, EUR 10,- for commercial use, please request a license at
Support is only available for licensed versions.

Command line switches:

You can see the help by entering

delolder /?

delolder fileset [/Keep:keepnumber] [/FreeDisk:freeDiskBytes] [/Age:Age]
[/Percent:PercentOfMax] [/Size:SizeInBytes] [/DeleteInv]
[/Test] [/?]

Fileset (*.BKF)

files to be deleted, use wildcards!

/Keep:keepnumber (/Keep:42)

At least this number of files will be kept regardless of any other criteria (except /DeleteInv)

/freeDiskBytes: # (/freeDiskBytes:200kB)

make this number of bytes (kb, GB) free on the disk.
The number of files specified in /Keep are kept at least!
Deletion starts with oldest files, files are not deleted if younger than specified in /Age.

Numbers are named according to IEC 1996 and can be:
bytes: e.g. 2048
Kilobyte: 2kb = 2.000 bytes
Kibibyte: 2KiB = 2.048 bytes
Megabyte: 2Mb = 2.000.000 bytes
Mebibyte: 2MiB = 2.097.152 bytes
Gigabyte: 2GB = 2.000.000.000 bytes
Gibibyte: 2GiB = 2.147.483.648 bytes

/Age:Age (/Age:2w)

only files that are older than that age are deleted. The age can be specified in:

Days: e.g. 14
Weeks: 14W
Months: 2M
Years: 2Y

/PercentOfMax:percent (/PercentOfMax:50)

Files smaller than this size are treated as invalid (see /DeleteInv)

/SizeInBytes:size (/SizeInBytes:50MB)

Files smaller than this size are treated invalid (see /DeleteInv)

/deleteInv

Invalid Files are deleted (otherwise they are ignored i.e. kept but not counted)

/test

Test-run, report actions without actually executing!
Is a good Idea to use that first!

Sample Use Cases:

You can delete all files older than a certain age, or just keep the newest 3 files.
You can delete files until a certain amount of harddisk space is available while keeping at least 1 file.
You can even judge if a file is valid by watching it's size. Sometimes the backup process creates a backup
but stop after 500MB. With the valid theshold of 500MB you can either skip or delete such files while preserving
older but valid files.

In my installations I used some batch files calling ntbackup to back up my customer's pc. I did not
want to overwrite the backup files since sometimes the backup process did not work completely, and produced
broken output.

The backup batch files produced something like "LABIS_backup_xxxxxxxx.bkf":
e.g.

04.09.2008 22:26 1.155.615.232 LABIS_backup_200809042200.bkf
11.09.2008 22:25 1.158.760.960 LABIS_backup_200809112200.bkf
18.09.2008 22:25 1.162.955.264 LABIS_backup_200809182200.bkf
25.09.2008 22:27 1.166.100.992 LABIS_backup_200809252200.bkf
02.10.2008 22:27 1.172.395.520 LABIS_backup_200810022200.bkf
09.10.2008 22:28 1.175.651.840 LABIS_backup_200810092200.bkf

So I was searching for something that deleted my old files, ensuring that at least 2 backup files was left
There is a rather old VBS script somewhere out there, but I was not able to get that running, and it was not
able to retain a number of files.
I decided to practice a little bit C# which means that delolder needs the .NET library (2.0).

In the example above, you can e.g. want to keep the files of the last 3 weeks but keep at least 3 files:
(please notice the testmode /test)

c:\backup>delolder /age:3w /keep:3 /test labis*.ful
SigiSoft DelOlder 1.00.03
Parameters:
Files:labis*.ful
/age:21 (=22.09.2008 15:43)
/test
5 to keep c:\backup\LABIS_backup_200810092200.ful
4 to keep c:\backup\LABIS_backup_200810022200.ful
3 to keep c:\backup\LABIS_backup_200809252200.ful
0 would have deleted c:\backup\LABIS_backup_200809042200.ful
1 would have deleted c:\backup\LABIS_backup_200809112200.ful
2 would have deleted c:\backup\LABIS_backup_200809182200.ful

DelOlder kept 3, would delete 3 and failed for 0 out of total 6 files
would delete 3,24GiB




If the backup failed for any reason at 2008/10/02 the file list might look this way:

04.09.2008 22:26 1.155.615.232 LABIS_backup_200809042200.bkf
11.09.2008 22:25 1.158.760.960 LABIS_backup_200809112200.bkf
18.09.2008 22:25 1.162.955.264 LABIS_backup_200809182200.bkf
25.09.2008 22:27 1.166.100.992 LABIS_backup_200809252200.bkf
02.10.2008 22:27 2 LABIS_backup_200810022200.bkf
09.10.2008 22:28 1.175.651.840 LABIS_backup_200810092200.bkf

If you want to keep at least 3 valid backup files, you can specify a minimum backup size (e.g.1gb):
you can specify the minimum size in gb, Mb, kb, bytes or GiB, MiB, KiB.

c:\backup>delolder /age:3w /test /keep:3 /size:1gb labis*.ful

SigiSoft DelOlder 1.00.03
Parameters:
Files:labis*.ful
/keep:3
/age:21 (=22.09.2008 16:05)
/size:953,68MiB
/test
5 to keep c:\backup\LABIS_backup_200810022200.ful
4ignored invalid file c:\backup\LABIS_backup_200810092200.ful
3 to keep c:\backup\LABIS_backup_200809252200.ful
2 to keep c:\backup\LABIS_backup_200809182200.ful
0 would have deleted c:\backup\LABIS_backup_200809042200.ful
1 would have deleted c:\backup\LABIS_backup_200809112200.ful

DelOlder kept 3, would delete 2 and failed for 0 out of total 6 files
1 invalid files
would delete 2,16GiB


You can also delete invalid files with /DeleteInv (Decide yourself if you want to automatically remove those files.)

Disclaimer:

  • Use at your own Risk.
  • SigiSoft is not responsible for any damage done with the use or abuse of this tool.
  • If you do not accept this, you are not allowed to use this tool.


(c) Sigisoft, all Rights reserved (www.sigisoft.com)


 

Locations of visitors to this page