Working with localized folder names

I’m really new to writing my own PS scripts and I’ve run into an issue that I can’t seem to Google my way out of.

I work with video surveillance systems and the software that we use organizes it’s archive storage with localized folder names. The actual name of a folder looks like a random string of 36 letters and numbers, but there’s a desktop.ini folder that specifies a more “friendly” name. My problem is that I need PS to be able to work with the friendly names instead of the real names: I’m using it to check for the oldest folder and knowing that b696cafc-f47c-4e60-bc64-79d6b7b6ff3b is 45 days old is great, but that’s not the name that Explorer sees when I log in to check.

Can this be done or am I out of luck? Thanks.

You should be able to Get-Content the desktop.ini file and pull the friendly name out of it (with -match). It should be easy to correlate that with the real folder name.

[quote quote=206103]You should be able to Get-Content the desktop.ini file and pull the friendly name out of it (with -match). It should be easy to correlate that with the real folder name.

[/quote]
I’l try that, thanks!

Ok. You can also just open a desktop.ini file with Notepad or any text editor to look at the contents, and this list of parameters may be useful, as well as the official documentation. It’s probably the LocalizedResourceName parameter being used to set the name.