Arturito.net

Come to The Dark Side, We Have Cookies!

Archive for the ‘Projects’ Category

File Destroyer – clean up/free up disk space and deleting files or folders after a certain period of time

leave a comment »

Utility to clean up/free up space in a folder and its subfolders.
* Deleting files or folders after a certain period of time.
* Deleting files with certain extension.
* Supports files over 1GB
* Supports UNC file paths


https://sourceforge.net/projects/filedestroyer/

Overview:

This software frees up a disk space by removing files older than specified number of days. It supports UNC paths and large files. Further versions will support more options.

Prerequisites:

.NET framework 3.5
FileDestroyer.exe

Configuration:

Software requires 3 parameters

- scan <directory_path_to_scan>

- ext <file_extension_to_search_for>

- log <directory_path_where_to_save_logs>

-days <number_of_days>

Examples:

FileDestroyer.exe -scan “D:\SQLBackup” -ext bak -log “D:\Logs\” –days 2

This command removes all files with extension bak that are found in directory D:\SQLBackup that are older than 2 days

To execute over the network use:

\\svdapp62\Tools\FileDestroyer.exe -scan “\\svdapp62\SQLBackup” -ext bak -log  \\svdapp62\Logs -days 0

Here option –days 0 removes all *.bak files.

Logs:

22/06/2010 02:56:43 INFO: Found 1 files with extension bak
22/06/2010 02:56:43 INFO: Removing files older than 0 (22/06/2010).
22/06/2010 02:56:43 INFO: File removed: \\svdapp62\SQLBackup\Default\bosap31_audit\asdasd.bak
22/06/2010 02:56:43 INFO: Removed 1 files
22/06/2010 02:57:23 INFO: Found 1 files with extension bak
22/06/2010 02:57:23 INFO: Removing files older than 0 (22/06/2010).
22/06/2010 02:57:23 INFO: File removed: \\svdapp62\SQLBackup\Default\bosap31_audit\New Text Document.bak
22/06/2010 02:57:23 INFO: Removed 1 files

Written by arturito

July 13, 2010 at 2:59 pm

Posted in Projects

Follow

Get every new post delivered to your Inbox.