Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

CMD & Powershell: copy folders omitting files with extension & prefix

Hello experts,

I am looking for a cmd command to copy one root folder to a destination folder.
I was thinking to a robocopy command but if powershell can cover the need I am in.

Requirements:

Destination folder contains multiple subfolders, they contains “.txt” and “.log” ie extensionS. “.txt” and “.log”
They start with the following Prefix: “Import”
The idea is to copy the various subfolder to destination folder and omitting the various files with those extensions and prefix listed bellow
Source folder: C:\Install
Destination folder: C:\New Install
Note: files can be located in different subfolders.

If you have questions, please contact me.
Thank you very much for your help
ASKER CERTIFIED SOLUTION
Avatar of yo_bee
yo_bee
Flag of United States of America 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 Luis Diaz

ASKER

oK, I tested and it works! Thank you very much for your help!