Upper case Conversion to Lower Case does NOT Work ?

Bulk Rename Utility How-To's

Upper case Conversion to Lower Case does NOT Work ?

Postby Flourgrader » Wed Feb 05, 2025 10:48 am

I'm encountering an issue with bulk renaming folders in the Windows 11 filing system. Specifically, when I attempt to rename multiple folders simultaneously (for example, changing "AUDIO," "EGYPT," "TV," and "MUSIC" to "audio," "egypt," "tv," and "music," respectively), the changes are not applied. Even after refreshing the file explorer view, the folder names remain in capital letters.
I am having to use Powershell in Windows 11 to achieve my goal,
Example.


Get-ChildItem -Path "F:\AUDIO\CRIME" -Directory -Recurse | ForEach-Object {
if ($_.Name -match "[A-Z]") {
$tempName = $_.FullName + "_temp"
Rename-Item -Path $_.FullName -NewName $tempName -ErrorAction Stop
$newName = $_.Name.ToLower()
Rename-Item -Path $tempName -NewName $newName -ErrorAction Stop
}
}
Flourgrader
 
Posts: 9
Joined: Wed Feb 24, 2021 2:00 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby therube » Wed Feb 05, 2025 7:40 pm

Unable to confirm on my end - unless the directory is "in use".
(In my case, I opened a command prompt in a directory, & that directory would not rename until I closed it.)

1. before, uppercase
2. intended actions, to change to lowercase
3. after, all lowercase
(then I upper'd again & then opened command prompt in SYSTEMINFORMER directory)
4. message when attempting to lowercase SYSTEMINFORMER
(all other directories/subdirectories were lowercase'd)

Image


So, what is going on with your F:\AUDIO\CRIME to cause it to fail?
therube
 
Posts: 1427
Joined: Mon Jan 18, 2016 6:23 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby Flourgrader » Thu Feb 06, 2025 10:32 am

@therube,
I am encountering an issue with the F:\AUDIO\CRIME Folder, as it seems to be failing to Reaname!
Upon further inspection, I discovered that the folder is located on a USB 3.0 SD card.
I attempted to rename the Folder directly on the SD card after reading your post,
but unfortunately, this did not resolve the issue.
As a next step, I copied the Folders from the SD card to my internal NVMe drive.
After doing so, I launched BRU and proceeded to mark the Folders for renaming.
To my surprise, the renaming process was successful.
This leads me to wonder if there is something specific going on with the SD card & BRU
Could you help clarify what might be causing the issue?
Flourgrader
 
Posts: 9
Joined: Wed Feb 24, 2021 2:00 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby Admin » Fri Feb 07, 2025 12:02 am

How is the USB 3.0 SD card formatted ? FAT32, NTFS, ExFAT, other?
If you not only change the case, but also add a prefix and then remove that prefix does it work?
I suspect it's an issue with that card.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby Flourgrader » Fri Feb 07, 2025 2:39 pm

@Admin , you might just have something there, the sd-card is formated exFAT,
it's not my card,and I did not think to check the format.
My Powershell code does work:
here is the code:
Get-ChildItem -Path "I:\AUDIO\CRIME" -Directory -Recurse | ForEach-Object {
if ($_.Name -match "[A-Z]") {
$tempName = $_.FullName + "_temp"
Rename-Item -Path $_.FullName -NewName $tempName -ErrorAction Stop
$newName = $_.Name.ToLower()
Rename-Item -Path $tempName -NewName $newName -ErrorAction Stop
}
}
BRU does not work and simular programs like Better File Rename do not work.
Maybe it's the exFAT format that is tripping up the program?
I need to format an sd card with NTFS format and repeat the test!!
Flourgrader
 
Posts: 9
Joined: Wed Feb 24, 2021 2:00 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby Admin » Sat Feb 08, 2025 1:24 am

The Powershell script , it looks like it's using a temp file to rename, that is why it's working. The same as adding a removing a prefix in BRU to rename.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Upper case Conversion to Lower Case does NOT Work ?

Postby Flourgrader » Sun Feb 09, 2025 11:57 am

Completed the above test with NTFS format.
All is good.
exFAT format is the problem!
Flourgrader
 
Posts: 9
Joined: Wed Feb 24, 2021 2:00 pm


Return to How-To