Testing Robocopy Switches with AHK

Get help with using AutoHotkey and its commands and hotkeys
fenchai
Posts: 236
Joined: 28 Mar 2016, 07:57

Testing Robocopy Switches with AHK

24 Aug 2019, 21:19

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy this is the documentation of MS robocopy

Code: Select all

#SingleInstance Force
#Persistent

; robocopy test!

source := A_Desktop "\"
destination := A_Desktop "\move here\"
files := A_Desktop "\move file.txt"

RunWait, % "robocopy " source " " destination " " files " /mov /IS",,hide

ExitApp
This does not seem to do anything. Anyone has ever used robocopy?
User avatar
flyingDman
Posts: 745
Joined: 29 Sep 2013, 19:01

Re: Testing Robocopy Switches with AHK

24 Aug 2019, 21:41

This worked for me:

Code: Select all

source := A_ScriptDir
destination := A_Desktop
files := "showlist.txt"

RunWait, Robocopy %source% %destination% %files% /mov,,hide
What is /IS? It says "Includes the same files." Same as what?
There are some other ones that are interesting.

Code: Select all

/it 	Includes "tweaked" files.  ; tweaked?
/xn 	Excludes newer files           ;newer?
fenchai
Posts: 236
Joined: 28 Mar 2016, 07:57

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 12:02

flyingDman wrote:
24 Aug 2019, 21:41
This worked for me:

Code: Select all

source := A_ScriptDir
destination := A_Desktop
files := "showlist.txt"

RunWait, Robocopy %source% %destination% %files% /mov,,hide
What is /IS? It says "Includes the same files." Same as what?
There are some other ones that are interesting.

Code: Select all

/it 	Includes "tweaked" files.  ; tweaked?
/xn 	Excludes newer files           ;newer?
I don't understand how is it working for you? I run it on my computer and it doesn't do anything :headwall:
anyways I think I'm bailing on this one. I was trying to see if robocopy could move files better than FileMove, It seems like dropbox had a tendency of duplicating some of my files even after it was moved. But I think I'm just gonna have to find another way around.

thanks for testing.
garry
Posts: 2279
Joined: 22 Dec 2013, 12:50

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 14:33

have an example with robocopy , can't send script , I'm blocked ... ( ? )
gregster
Posts: 4461
Joined: 30 Sep 2013, 06:48

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 14:59

garry wrote:
25 Aug 2019, 14:33
have an example with robocopy , can't send script , I'm blocked ... ( ? )
Sorry for the inconvenience, the various anti-spam rules are sometimes overshooting a bit (or a bit more ;) ), even for unsuspicious code and longtime users (I was affected myself, recently). But you could:
tank wrote:
23 Feb 2019, 16:49
please use pastebin for your post and email a link to it to support -at- ahkscript.org. I will review the content and make a decision on weather to find and relax a specific firewall rule or reject your post.
Of course, post the pastebin link here, too... but the feedback might help tank to improve the current rules.
garry
Posts: 2279
Joined: 22 Dec 2013, 12:50

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 15:25

https://pastebin.com/XFQM3qQp

I have a very small 4K Computer Beelink , Windows is on drive C:\
My files are on Drive D:\ ,
I copy from drive D:\ to E:\ the folders M_GARRY and M_IRENE and A_DESKTOP (C:\users\garry\desktop) to drive E:\_BEELINK ( see VT total drives =3 )
a logfile is in folder %a_desktop%\ROBOCOPY_LOG which is excluded
while running %cmd% pop up , at end see messagebox > COPY ended
-------------------------------------
try to copy this last example :
ccc3 =%a_desktop%
source3=%ccc3% ;
dest3 =%last%_BEELINK\DESKTOP ; %last% means this should be the new connected drive , in your case maybe D:\ ( see VT total drives =3 )
-------------------------------------
User avatar
flyingDman
Posts: 745
Joined: 29 Sep 2013, 19:01

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 16:05

Would there be any reason for RunWait, Robocopy to work for me, while others would require runwait, %comspec% /c robocopy?
garry
Posts: 2279
Joined: 22 Dec 2013, 12:50

Re: Testing Robocopy Switches with AHK

25 Aug 2019, 16:27

sometimes I use for small programs "run, %comspec% /k xy.exe" to see what happens ( for test ) , here not needed

Return to “Ask For Help”

Who is online

Users browsing this forum: barbudo2005, Bing [Bot], boiler, burque505, Getfree, Google [Bot], kdservices, TAC109, WeThotUWasAToad and 149 guests