Working with localized folder names

Welcome Forums General PowerShell Q&A Working with localized folder names

  • This topic has 3 replies, 2 voices, and was last updated 3 months ago by
    Senior Moderator
    .
Viewing 3 reply threads
  • Author
    Posts
    • #206073
      Participant
      Topics: 1
      Replies: 1
      Points: -5
      Rank: Member

      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.

    • #206103
      Senior Moderator
      Topics: 3
      Replies: 123
      Points: 653
      Helping Hand
      Rank: Major Contributor

      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.

    • #206211
      Participant
      Topics: 1
      Replies: 1
      Points: -5
      Rank: Member

      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.

      I’l try that, thanks!

    • #206316
      Senior Moderator
      Topics: 3
      Replies: 123
      Points: 653
      Helping Hand
      Rank: Major Contributor

      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.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.