mikeparkie Posted January 8, 2011 Report Share Posted January 8, 2011 I need some help with robocopy. One I have downloaded my portable application, it extracts it to my Portable Apps folder 7z x "{file}" -o"{root}\My Portable Apps\{appname}" -y What I would like to do is then have robo copy, copy the folder to "C:\program files\" The wiki example says: robocopy %temp% "{root}PATH" *.exe /e /b /np So I've copied 'robocopy.exe' into my Ketarin folder. And I'm using: 1. 7z x "{file}" -o"{root}\My Portable Apps\{appname}" -y 2. robocopy "{root}\My Portable Apps\{appname}" "C:\Temp" *.exe /e /b /np But the folder is not being copied over to C:\Temp. Why not? Any pointers would be appreciated Link to comment Share on other sites More sharing options...
Omniferum Posted January 8, 2011 Report Share Posted January 8, 2011 I don't believe copy commands can actually further specify extensions, it is either 1 file or 1 folder and that's about it. I use xcopy myself but it doesn't really make any specific difference You should however post your log for any real help, just click on view then show log. It will give you a little cmd window with the text of what happened. Link to comment Share on other sites More sharing options...
Tomorrow Posted January 8, 2011 Report Share Posted January 8, 2011 (edited) robocopy "{root}\My Portable Apps\{appname}" "C:\Temp" *.exe /e /b /np But the folder is not being copied over to C:\Temp. Why not? Any pointers would be appreciated Seems that you have specified that only .exe files should be copied to destination.But if no exe files are found(only folders) then no files or folders are copied to destination.Atleast this is what im thinking Also: By default Robocopy will only copy a file if the source and destination have different time stamps or different file sizes. .If you want to force copy anyway use /IS flag. Try this perhaps: robocopy "{root}\My Portable Apps\{appname}" "C:\Temp" /e /b /np EDIT: Exactly what Omniferum said .Tho you can customize copy by excluding on including files to be copied.That way you won't have to copy singe folder but you can still copy files you actually need. /XF file [file]... : eXclude Files matching given names/paths/wildcards./XD dirs [dirs]... : eXclude Directories matching given names/paths. XF and XD can be used in combination e.g. ROBOCOPY c:\source d:\dest /XF *.doc *.xls /XD c:\unwanted /S Edited January 8, 2011 by Tomorrow Link to comment Share on other sites More sharing options...
shawn Posted January 10, 2011 Report Share Posted January 10, 2011 I use robocopy all the time, and for this purpose, you'll probably want to look into the mirror option. Something like this: robocopy "{root}\My Portable Apps\{appname}" "C:\Temp\{appname}" /MIR /BYTES /ETA Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now