Link to home
Start Free TrialLog in
Avatar of Allen
AllenFlag for United States of America

asked on

copy script to search for source file

I'm trying to copy a Windows backup file (VHD) to a Samba share that is backed up off site weekly.  However- I need to only backup the VHD (not the XML files, directories, etc.) and place the VHD in the root of the share.  I can of course do this manually, but would like to instead schedule a script to run weekly.

The hard part is getting my script to search the WindowsImageBackup\...\ directories for the VHD files before copying.  Is there a copy tool, such as xcopy, that will search subdirectories for the source file, or does anyone have a handy dandy script?
SOLUTION
Avatar of Santosh Gupta
Santosh Gupta

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 Allen

ASKER

Thanks for the response.  

I received- ERROR: Invalid argument/option - '@file'

D:\ is the source & E:\backup is the destination, correct?
Avatar of Santosh Gupta
Santosh Gupta

Note: do not use '\' after source and destination name. like C:\temp NOT C:\temp\

yes, D:\ is the source & E:\backup is the destination.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

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