Script to Copy Data and Rename It
top of page

Script to Copy Data and Rename It


A very simple Powershell script can be used to copy files from one folder and save them renamed in another folder.

The simple command, 'Copy-Item' will accomplish this task. Simple follow it by the path to the source file name and the new file name.

So a script like this:

Copy-Item "C:\FooFolder\Picture1.png" "C:\FooFolder\NewFolder\ScreenGrab1.png" Copy-Item "C:\FooFolder\Picture2.png" "C:\FooFolder\NewFolder\ScreenGrab2.png" Copy-Item "C:\FooFolder\Picture3.png" "C:\FooFolder\NewFolder\ScreenGrab3.png" Copy-Item "C:\FooFolder\Picture4.png" "C:\FooFolder\NewFolder\ScreenGrab4.png"

. . . will copy the .png files to the new location. 'New Folder', renamed as 'ScreenGrab1.png'; 'ScreenGrab2.png'; 'ScreenGrab3.png'; and 'ScreenGrab3.png'


bottom of page