Author Topic: Can't Change Lowercase Letters in File Names  (Read 4494 times)

0 Members and 1 Guest are viewing this topic.

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 2024
  • Country: us
Can't Change Lowercase Letters in File Names
« on: January 02, 2020, 04:07:18 am »
I have an external hard drive connected via a switch to my PC that I use as a backup.

Periodically I come across a file that has lowercase letters in the file name. I attempt to change them to capital, however, the change doesn't take affect.

If I take the same file, copy it to my main drive (C:), rename it, and copy it back to the network drive, it works fine.

Does anyone know why this happens?
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3474
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #1 on: January 02, 2020, 04:52:22 am »
I assume you are using Windows.  Windows filename is case-insensitive, so it thought you made no change and so it made no change.  You can work around the problem by first changing the name to something else first, then change it back with upper case.

For example, I want to change "this.iso to" to "THIS.ISO":
"ren this.iso THIS.ISO"  will do nothing
So do it in two steps:
"ren this.iso that.ixo"
"ren that.ixo THIS.ISO"

Now the file "this.iso" is "THIS.ISO"
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 2024
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #2 on: January 02, 2020, 02:25:35 pm »
Yes, I'm using Windows.

Most time this isn't a problem because I'm only copying files from my main drive to my network drive, however, I'm in the process of renaming several MP3s that are stored exclusively on my network drives.

I use Magic File Renamer to fix files that are all lowercase or poorly capitalized. Unfortunately to get around this issue, I have to copy all the MP3s to my main drive, rename, and copy back; all time consuming.

Not sure changing the file names first would be easier since I have many to change.
 

Offline Mr Evil

  • Regular Contributor
  • *
  • Posts: 76
  • Country: gb
    • mrevil.asvachin.com
Re: Can't Change Lowercase Letters in File Names
« Reply #3 on: January 02, 2020, 03:00:35 pm »
What filesystem is the external drive formatted with? Windows won't let you rename a file if the only change is to the casing when the filesystem is FAT32 (and I think exFAT too). It's probably a bug, but it's been like that for a long time, so they're never going to fix it now.

...Windows filename is case-insensitive...
Technically it's case retentive - it knows the difference between names that differ in case, but won't let you create two files with names that differ only in case.

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #4 on: January 02, 2020, 03:11:18 pm »
Maybe do it in two steps with Magic renamer.

Use a replace filter (http://www.finebytes.com/mfr/help/replacerfilter.html) to replace .MP3 with .MP3____.

Then do whatever renaming you want directly back to Band - Album - Track# - Title.mp3

If something goes badly along the way, you can always use a replace filter to replace .MP3____ with .mp3
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 2024
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #5 on: January 02, 2020, 03:17:20 pm »
Quote
What filesystem is the external drive formatted with?

I believe it is FAT32.

I never tried renaming the file with more than just changing a lowercase to capital when the only change needed was capitalizing. I should try that to confirm if that works.

 

Offline vwestlife

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
    • The Official AM STEREO Web Site
Re: Can't Change Lowercase Letters in File Names
« Reply #6 on: January 02, 2020, 09:24:12 pm »
Put the file name in double quotes: "FILE.TXT". Then Windows should not attempt to change it to all-lowercase.
Subscribe to VWestlife on YouTube
Retro Tech - Audio - Video - Radio - Computers - Electronics
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17063
  • Country: us
  • DavidH
Re: Can't Change Lowercase Letters in File Names
« Reply #7 on: January 03, 2020, 12:36:22 am »
File explorer might not automatically detect the change and update because as far as it is concerned, the filename is the same.  After renaming the file, refresh the display with F5.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15168
  • Country: fr
Re: Can't Change Lowercase Letters in File Names
« Reply #8 on: January 03, 2020, 02:34:03 pm »
What filesystem is the external drive formatted with? Windows won't let you rename a file if the only change is to the casing when the filesystem is FAT32 (and I think exFAT too). It's probably a bug, but it's been like that for a long time, so they're never going to fix it now.

...Windows filename is case-insensitive...
Technically it's case retentive - it knows the difference between names that differ in case, but won't let you create two files with names that differ only in case.

Yep. Even with the old FAT partitions, Windows had come up with a trick to store the "full name" (possibly longer than the 8.3 allowed by the FS, and with lowercase supported). Any operations on files is case insensitive on Windows, but the full name (including case) still remains available as it was created. If you copy files on other systems that are case-sensitive, it will make a difference on those.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 2024
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #9 on: January 03, 2020, 03:24:09 pm »
Quote
(possibly longer than the 8.3 allowed by the FS, and with lowercase supported)


What do you mean by 8.3?
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Can't Change Lowercase Letters in File Names
« Reply #10 on: January 03, 2020, 03:31:38 pm »
Original DOS filename limits were 8 characters and a 3 character extension.

"WORD.EXE" was OK.

"Microsoft Word.exe" was not, so there was a scheme invented to be backwards compatible with the DOS 8.3 limits while storing the extended filenames elsewhere and having Windows Explorer and other long filename aware apps use that. This is why "Program Files" becomes "PROGRA~1" in DOS and some other applications.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15168
  • Country: fr
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf