The Mudcat Café TM
Thread #59548   Message #949784
Posted By: JohnInKansas
10-May-03 - 04:59 AM
Thread Name: Tech: File Editing Help
Subject: RE: FILE EDITING HELP
Make a safe backup copy of all the original files.

Create a new folder and a copy of all the files in it.

Open a DOS/Command window, go to the new folder and type:

DIR *.*>filelist.txt

This creates a file named filelist.txt that has a list of all the files - and some other garbage - in it.

Open the file in Word and "Edit Replace" every double-space " " with "^t"

The "^t" (without quotes) is Word shorthand for a tab.

Remove excess tabs with "Replace ^t^t with ^t. "Replace All" repeatedly until no changes are shown.

Select everything and Convert Table - Text to Table.

Delecte all rows and columns that have anything other than the filenames.

Copy the filename column to a new column on the right.

Select the column on the right and replace "^#^#^# - " with "nothing" where ^# is Word shorthand for "any number" and "nothing" means make sure the "replace with" box is empty. Equivalent to deleting.
With right column still selected replace "^#^# - " and then "^# - " with "nothing," each in turn.

Clean up any "odd" names so that the column on the left shows the original filename and the column on the right shows the new filenames that you want.

Insert a new column on the left, and type "REN" in each cell (type once and copy down).

Select the whole table and "Tabel - Convert - Table to Text" using tabs as the separator.

Edit Replace "REN^t" with "REN "" (That's REN followed by a space, followed by a double quote.) Replace All.

Edit Replace "^t" with "" "" (Thats double quote, space, double quote.)

Replace ^p with "^p (^p is Word for a paragraph break).

You should now have a list in which each line is:

REN "oldfilename" "newfilename"

This means Rename the file named "oldfilename" to the new name "newfilename"

Save as a text file, and change the file extension to ".bat" so that the file name is now filelist.bat.

Open the Command Prompt. Go to the folder where the filelist.bat and all the files are, type filelist and hit enter.

If it doesn't work - well, at least you made that backup copy.

John