RM


RM Usage Information


Introduction

RM is a file deletion utility similar to the Unix RM command.
I wrote this for a University project back in 1992 and have used it ever since. It can be used from a script or batch file, or more commonly from the command prompt.


Installing RM

Simply click on the download button and then unzip and run the enclosed executable, by default the application will be installed to the C:\Program Files\DebugSPY folder.


Using RM

RM is simple to use and can be run from the command line, by entering RM followed by any command line arguments that you wish to use and then the files that you wish to delete.

E.g. Delete a file called test.txt with no output (option: -s).

    rm -s test.txt

Command Line Arguments

Arguments should be combined when specifying more than one.

    rm -rs test.txt

rather than seperately

    rm -r -s test.txt


Option: -r

Recursive delete - This option will enable RM to recursively parse the folder structure, allowing you to list or delete all matching files, folders or sub-folders.


Option: -i

Interactive delete - RM will ask you whether you want to delete each file/folder.
You can choose from the following options, Yes, No, All (RM will not ask again and will continue to delete all specified files) or Quit which stops RM from processing any more files.


Option: -f

Force delete - By default RM will not delete files that have been marked read only, by specifying this option RM will forcibly delete all files including the read only ones.


Option: -v

Verbose delete - Forces RM to list all files and folders as they are deleted.


Option: -q

Quiet delete - RM will only display error messages, such as permission denied errors.


Option: -l

List - RM will not delete any of the specified files, instead it will list each file/folder that would match the file specification you entered.
This allows you to verify which files will be deleted before actually deleting them.


Option: -s

Silent delete - In this mode, RM will not display any output at all.


Option: -t

Targeted delete - Find and delete folders of a specific name. Does NOT support wildcards.
I wrote this command as I needed to recreate my subversion repository and I wanted to delete all the .svn folders, which was not easy to do.

For example, if you had the following folder tree, then rm -t .svn will remove the .svn folders and their contents only, everything else would be left alone.

    test
    test\.svn
    test\Debug
    test\Debug\.svn


Option: -x

Permanent delete - By default RM will place all deleted files/folders into the Recycle Bin so that you can undeleted them if necessary later.
With this option enabled RM will bypass the recycle bin and delete the files permanently, this will also significantly increase the deletion speed of RM.

Using Wildcards

RM has full wildcard support, which include the '*' and '?' wildcard specifiers.

Example:

Recursively deleting all backup files, which have the extension "*.bak".

    rm -r *.bak

Change History ([New]New, [BugFix]BugFix, [Update]Updated)


[New] Sep 2010 (v4.0) - Updated to Visual Studio 2010 and a new installer
[Update] Aug 2007 (v3.3) - Modified the output so that if a large file path/name is to be displayed, then it will be truncated and ellipses added
[Update] Aug 2006 (v3.2) - Added the TARGET command
[BugFix] May 2006 (v3.1) - Some minor changes to remove warnings under Microsoft Visual C++ .NET 2005
[New] Apr 2006 (v3.0) - Initial Release - Part II (Completely Rewritten for Microsoft Visual C++)
[Update] Sep 1993 (v2.0) - Various Enhancements
[Update] Jan 1993 (v1.5) - Rewrote Recursive Funtion.
[New] Oct 1992 (v1.0) - Initial Public Release (University Project - Using the MIX C Compiler).