Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

PowerShell script to modify files name with the folder name

$
0
0

 Folder1
o    Files1.1
o    Files1.2
o    Files1.3
• Folder2
o    Files2.1
o    Files2.2
o    Files2.3
• Folder3
o    Files3.1
o    Files3.2
o    Files3.3

Im trying to modify the name of the file with the name of the folder where the files is.

Ex: Folder1-Files1.1
      Folder1-Files1.2
      Folder1-Files1.3
      Folder2-Files2.1
      Folder2-Files2.2
      Folder2-Files2.3
      Folder2-Files3.1
      Folder2-Files3.2
      Folder2-Files3.3

Im looking for a powershell script to do it automatically because I have a lot of files to modify the name.

Thank you for your help and your time.
Its appreciated


Viewing all articles
Browse latest Browse all 6937

Trending Articles