Index of /~pieter/SOFT/UNSPACE

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [TXT] README.html 13-Apr-2008 16:34 938 [   ] UNSPACE.c 13-Apr-2008 16:34 4.9K
UNSPACE version 0.05 by Pieter Suurmond, april 13, 2008.

A C-program that reads a directory recursively, reading all file- and 
directory-entries, and --if necessary-- renames them:

 - Translating TABs, newlines, carriage returns, formfeeds, etc. to spaces.
 - Removing leading and trailing whitespace, as well as multiple spaces inside.
 - Substituting space characters by underscores.
 - Substituting "_-_" by just "-".

I use it for my .WAV- and .AIFF-collection of ripped audio CD's.

Compile on the commandline with for example:

    gcc -O2 -Wall -o UNSPACE UNSPACE.c
    strip UNSPACE

To run the executable, supply one pathname of a directory as argument, without
any trailing slashes. For example, to unspace the current directory, type:

    ./UNSPACE .

Since the operation is not undoable, it may be wise to log all renamings to a
textfile, for example:

    ./UNSPACE /media/teradisk3 >>log.txt