Log in

View Full Version : Manipulation of folder's content.


Bratsch
December 29th, 2000, 08:18
Hi everybody.

This request for help does not have to do with reversing per se, but you are the crowd that knows most of the tricks, so there it goes:

I have 5560 files in a zip disk. They were transferred from an Mac machine to IBM format. As it is costummary, the name of the file gets a '!' symbol in front of it. ie: "num0001.seq" became "!num0001.seq". So far no problem. Now I have to put this files on a unix server. Unix does not like the files starting with '!'. I don't think I want to rename 5560 files manually, one by one!.
So here is my problem. I remembered good old Norton's Diskedit DOS version. I was planning to access the disk and change the attribute 'D'of the subdirectory that contains my files , open it with a text editor and replace all the '!' with something else, but the old diskedit version I have does not work with 32 bit FAT, and does not recognize ZIP drives. While coding a C utility to do the renaming may do the trick, I think there must be a simpler way. Questions to the public:

Does anybody know a utility to manipulate folders at low level?
Does anybody know a diskeditor like utility that works with FAT32 and or ZIP drives and can manipulate subdirectory entries (WINHEX can't)?
Does anybody know a simple way to rename 5K plus files without going crazy?

Thank you for your help.

carpathia
December 29th, 2000, 11:51
Personally I'd abandon all plans of low level editing and other wonderful exercises. You could go for a cheap n dirty batch file solution..

output all your filenames to a file DIR /B > files.txt

open files.txt in ultraedit

construct an ultraedit macro to take each filename, remove the ! and build a move command from it

run the batch file


Alternatively, dont be so lazy and just write an app to do it :-)
Its so mundanely trivial you could have coded it in the time I've written this reply!

Carpathia

cronos
December 29th, 2000, 13:28
Or you could just type
ren !*.* a*.*


Bratsch
December 29th, 2000, 16:14
Thankyou Carpathia for the advise and the Chastising I deserve it. I do not write code in a routine basis, so even a trivial program implies dusting my rusty skills.
The Ren !*.* A*.* worked! thanks. For some obscure reason it does not work in a ZIP drive (?). But once I moved every thing to a HD it went smoothly.