FileCopyDir is not working :( Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Ross
Posts: 100
Joined: 13 Mar 2016, 00:27

FileCopyDir is not working :(

20 Jun 2021, 20:13

Hi, it's been a while since I last could use FileCopyDir successfully. I don't know why I can't. For instance, I tried

Code: Select all

SetTitleMatchMode, 2

FileCopyDir, E:\test\source\vacation2014, E:\test\destination
	If ErrorLevel {
	MsgBox, Bummer.
}
Else {
	MsgBox, Great!
}
And I got the "Bummer" error message. Plus, no copies made.
After searching a bit, I found this, but it was unintelligible.
I also found this, which appears to be more meaninful, but still I see no mention to flags or third option onward on the docs for FileCopyDir.

What gives?
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: FileCopyDir is not working :(  Topic is solved

21 Jun 2021, 07:06

If the target directory already exists, it won't work. You can check that in your script, and also check whether the source directory exists.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: FileCopyDir is not working :(

21 Jun 2021, 10:07

if u ran an equivalent script with v2, it would tell u why it failed
User avatar
Ross
Posts: 100
Joined: 13 Mar 2016, 00:27

Re: FileCopyDir is not working :(

28 Jun 2021, 22:56

Thanks @mikeyww, that was it. Didn't know and wasn't getting the error message.
@swagfag I wish I could make the transition already :(

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Holarctic, mapcarter, robnicholson, Rohwedder and 341 guests