Rename numeric filename with sum delta value in PowerShell

Share
Viewing 2 reply threads
  • Author
    Posts
    • #1556256
      iniabele
      Participant
      • Topics: 1
      • Replies: 1
      Member Points: 106
      Rank: Level 2

      Hi all,
      Nice to join the group. I need your help to create a PowerShell script.

      I want to rename files in subdirectories, with sum delta value to the current one.

      The filenames contain 20 digits as below:

      00000000000000000010.txt

      00000000000000000100.txt

      00000000000000003000.txt

      00000000000000003500.txt

      I need to sum delta value 300 to all files:

      00000000000000000310.txt

      00000000000000000400.txt

      00000000000000003300.txt

      00000000000000003800.txt

      Thanks in advance!

      1+
      avatar
    • #1556257
      Leos Marek
      Moderator
      • Topics: 16
      • Replies: 158
      Post count: 181
      Member Points: 10,919
      Rank: Level 4

      Hello and welcome 🙂

      if I understand properly, you simply want to add +300 to each file name?

      Not sure what do you mean by “sum delta value”.

      Leos

      0
      • #1556258
        iniabele
        Participant
        • Topics: 1
        • Replies: 1
        Member Points: 106
        Rank: Level 2

        Correct , I need to sum 300 to each file

        Sorry

        0
    • #1556291
      David Figueroa
      Participant
      • Topics: 5
      • Replies: 30
      Post count: 13
      Member Points: 2,847
      Rank: Level 3

      This could be shortened, but this lays out the basic steps.

      David F.

      0
Viewing 2 reply threads
  • You must be logged in to reply to this topic.
© 4sysops 2006 - 2020

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account