Lower-casing filenames on fat32 external drive
Hi,
I have an external harddrive which is fat32 (which was filled when I was on a windows system) with a lot of files on (> 200gb) which have mixed case filenames. I wanted to write a script to rename them all to lowercase however when I did I got an error saying that the filenames are the same (which I guess is true as FAT is case-insensitive). My issue is that I'm mounting this from a linux box now so it would make it a lot easier if things were lower case! I've already run a script to replace all spaces with underscores. I know I could do this by first going through and renaming everything with a prefix and then renaming it back again (ie, rename File.Jpg to xFile.Jpg and then a second rename to strip that x off and rename lowercase to file.jpg) however I find this approach a bit messy and would prefer to do it all in one pass. Other than that, could I change the drive to ext4 without losing any files on it? The drive has a hell of a lot of stuff on there which is an archive of many years of files - I'd be absolutely gutted if I lost everything. |
this will change names from cap to lower
It might need some editing to fully comply with your needs -- but might not.( it will rename the whole name ) Code:
#!/bin/sh |
Quote:
That is pretty much exactly the same as the script I wrote however my issue is that because the filesystem is fat32, upper and lower filenames are considered to be the same. eg: Code:
$ touch FileName.Ext |
All times are GMT -5. The time now is 01:58 AM. |