Hello,
Here is how I would approach the problem. Start with a new five-line test script to see if you can move a file from one directory to another. If that works, you can then expand the script.
Learn the values of your variables. You can do this by displaying them, inspecting them, logging them, using ListVars, or using a debugging tool. What is the source value? What is the destination value? Does the directory exist? Does the source file exist? Your current approach answers none of these questions.
Here is how I would approach the problem. Start with a new five-line test script to see if you can move a file from one directory to another. If that works, you can then expand the script.
CODE:
#Requires AutoHotkey v1.1.33.11
source := A_ScriptFullPath
dest := A_MyDocuments
existed := FileExist(dest "\" A_ScriptName)
FileMove % source, % dest
MsgBox 64, Result, % "FileExist : " existed "`n"
. "ErrorLevel: " ErrorLevel
Learn the values of your variables. You can do this by displaying them, inspecting them, logging them, using ListVars, or using a debugging tool. What is the source value? What is the destination value? Does the directory exist? Does the source file exist? Your current approach answers none of these questions.
Statistics: Posted by mikeyww — Today, 16:37