Rename Files on a directory and subdirectories

Welcome Forums General PowerShell Q&A Rename Files on a directory and subdirectories

Viewing 3 reply threads
  • Author
    Posts
    • #229330
      Participant
      Topics: 2
      Replies: 1
      Points: 15
      Rank: Member

      Hi all

      I am looking to rename several files on a directory structure

      Files are like – 000010.txt. 000020.txt . ooo300.txt and so on across multiple directories

      I need to scan all files on all durectories and rename with a sum 100 to the file name, so the final resuls have to be

      000110.txt . 000120.txt 000400.txt

      Is there a way to create a poweshell script to do it

      Thanks

    • #229336
      Participant
      Topics: 3
      Replies: 340
      Points: 1,120
      Helping Hand
      Rank: Community Hero

      Yes.

    • #229342
      Participant
      Topics: 2
      Replies: 1
      Points: 15
      Rank: Member

      Thanks

      Any suggestion on how can do it ?

    • #229345
      Participant
      Topics: 3
      Replies: 340
      Points: 1,120
      Helping Hand
      Rank: Community Hero

      Hi. My first suggestion would be to search for existing solutions to nearly identical scenarios. There are several on this site and many more on the internet. If you want to continue yourself, I recommend learning get-item, get-childitem, and rename-item cmdlets. Good luck!

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