Jump to content
Ketarin forum

Help with robocopy and portable apps please


mikeparkie
 Share

Recommended Posts

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

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

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 by Tomorrow
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.