File Name and Path

Whenever a function parameter is specified as "filename", it implies a filename with a full path. Although AutoIt functions will often accept a relative path, this is not guaranteed to work correctly as some file functions in the Windows API require a fully qualified path. If no path is specified and only a simple name used to define a file, AutoIt will create it or search for it in the current working directory - the path for which can be found in the @WorkingDir macro.

The working directory is set to @ScriptDir at script start and this path can be altered during the running of the script by calling FileChangeDir. But note that the current working directory can be also be changed automatically by some functions - e.g. FileOpen/SaveDialog on a successful return, or Run if the "workingdir" parameter is specified.

The MSDN page Naming Files, Paths, and Namespaces has more details on how file names and paths should be written.