Script/Powershell to rename files names RRS feed

  • Question

  • Hey guys,

    I a bit new to powershell and was wondering if you guys can assist me here? Excuse my poor english since it's not my first language. Anyhow, I have files name something like p2122938.ext, p2724942.ext, etc.. Over a thousand of them and wanted to rename them to different things such as p2122938.ext would rename to iloveyou and p272494.ext would be rename to ihateyou. I have seperated these .ext name into a text and the renamed such as iloveyou, ihateyou into another text file. Basically, I was wondering how to write a script to pull those two text file and rename the actual file in a certain folder. Example, .ext file names is in test1.txt and the rename I want them to be is in a text file test2.txt, run script and it would replace all the actual file in MyDocument\p*.ext to test2.txt naming base off test1.txt. 



    • Moved by Bill_Stewart Wednesday, September 4, 2019 9:39 PM This is not "scripts on demand"
    Tuesday, April 30, 2019 3:30 AM

All replies