Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v1) • Re: FileMove Troubleshooting

$
0
0
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.

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



Viewing all articles
Browse latest Browse all 579

Trending Articles