Link to home
Start Free TrialLog in
Avatar of LeighWardle
LeighWardleFlag for Australia

asked on

PowerShell script to copy file to all folders of the form C:\Users\AnyUserName\CIRCLY7

Hi Experts,

I'm after a PowerShell script that will do the following:

For each folder of the form C:\Users\AnyUserName\CIRCLY7

copy C:\myfolder\myfile.xyz to C:\Users\AnyUserName\CIRCLY7\myfile.xyz

Not sure if it is any help, but I used a Regular Expression editor using C:\Users\AnyUserName\CIRCLY7 as a template.
The result was (C:\\Users\\).*[^\\]+.*(CIRCLY7)

Regards,
Leigh
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeighWardle

ASKER

Thanks, John, your script works well.

Regards,
Leigh