Robocopy - Wildcard to copy everything from current source directory
I'd like to use Robocopy (I'm using Xcopy now) to copy everything from the 'current' folder. It appears that Robocopy absolutely has to have a path of some sort to correctly work. In Xcopy, we were able to runXcopy *.* C:\somedirectory\If I try the same in Robocopy I get a an error"No Destination Directory Specified"Orange County District Attorney
February 5th, 2010 7:54pm

Hi Sandy, It's true ROBOCOPY doesn't handle wild cards, but what you're after is still possible: Say I want this: C:\temp> robocopy *.* c:\temp2\ I'll get the error you get - "No Destination Directory Specified" BUT, if you try this: C:\temp> robocopy c:\temp\ c:\temp2\ ROBOCOPY will work and do what your after. Quotation marks can also be used in the above path references. I suppose one of the reasons for the lack of wildcard support is the fact that ROBOCOPY actually works to exclude files types later with the /XF switch (such as "/XF *.mp3"). More here. Hope this helps, Kevin @calwell on twitter.
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2010 11:07pm

Thanks Kevin, I think that will work. Too bad the wild cards are not usable.Orange County District Attorney
February 6th, 2010 12:05am

You're welcome.. I hope you get what your after... you may also want to take a look at HoboCopy - that does a similar thing, seems to support wildcards and uses the Volume Shadow Copy service to copy open files.. Thanks, Kevin @calwell on twitter
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2010 12:14am

Wow, I've never heard of HoboCopy. It looks pretty good - for me, I normally don't need all the switches in a product like Robocopy; and I like the VSS integration that Hobocopy has. My use now is limited to copying application files for installation on a Windows 7 image. We use the Microsoft Deployment Toolkit to create our images and install the apps we need. Some of our apps are very old and we install them by copying them to the local machine (during image creation) and then running come vbscripts to craeat shortcuts for them. We're try ing to standardize on Robocopy instead of xcopy.Orange County District Attorney
February 6th, 2010 12:36am

Sandy, That's all good.. for what you describe robocopy would have no problem handling that task. There are a number of great uses for robocopy and hobocopy in terms of backup.. one type of use (for example) is when used backup a user's documents folder: robocopy "%USERPROFILE%\Documents" "H:\localfiles\Documents" /E /PURGE /V /NP /XF *.mp3 *.m4a *.pst *.tmp *.avi *.wav /R:10 /W:30 or with hobocopy backing up data (in an accounting directory) to an external drive: HoboCopy /statefile=z:\backup\accounting\directcopy\hbstate /incremental /skipdenied /y /r d:\accounting\ z:\backup\accounting\directcopy\ > z:\backup\accounting\DirectLog.log Thanks, Kevin @calwell on twitter
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2010 2:00am

I'm curious, what is the advantage of RoboCopy over Xcopy?Rich
February 6th, 2010 4:44am

robocopy is a more modern program and has a better ability to make sure the copy is successful .Vote if answered or helpful, I am running for Office (joke)! IT/Developer, Windows/Linux/Mainframe RaidMax Smilodon, 680W, Asus M2NBP-VM CSM AMD X2 4200+, 2GB DDR2-800, x600, more details on my site, need a video card for the Windows machine, the 8600 GT fried
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2010 7:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics