Cant move and create files?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AtleastItried
Posts: 51
Joined: 03 Mar 2017, 04:51

Cant move and create files?

03 Mar 2017, 14:26

I have a little programme that is supposed to move a file from the folder it is inside of and create 2 new files, but it doesn't do any of these:

Code: Select all

Install:
Gui, Destroy
FileMove, %A_WorkingDir%Limited.exe, %A_Desktop%
FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P, C:\Users\%User%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\SteamUI.txt
FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P, %A_Desktop%
if (Errorlevel=0){
Gui, add, text,,Success!
Gui, show
}
else{Gui, add, text,, Error=%ErrorLevel%
Gui, show
}
Return




Log:

013: Gui,Destroy (0.03)
014: FileMove,%A_WorkingDir%Limited.exe,%A_Desktop%
015: FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P,C:\Users\%User%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\SteamUI.txt
016: FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P,%A_Desktop%
017: if (Errorlevel=0)
021: Gui,add,text,,Error=%ErrorLevel%
022: Gui,show
023: }
026: Return (6.19)
User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: Cant move and create files?

03 Mar 2017, 14:32

Are you missing a "\" from this line???

CURRENT:

Code: Select all

FileMove, %A_WorkingDir%Limited.exe, %A_Desktop%
REVISED:

Code: Select all

FileMove, %A_WorkingDir%\Limited.exe, %A_Desktop%
AtleastItried
Posts: 51
Joined: 03 Mar 2017, 04:51

Re: Cant move and create files?

03 Mar 2017, 14:40

aztec3 wrote:Are you missing a "\" from this line???

CURRENT:

Code: Select all

FileMove, %A_WorkingDir%Limited.exe, %A_Desktop%
REVISED:

Code: Select all

FileMove, %A_WorkingDir%\Limited.exe, %A_Desktop%
True, this works, thanks

What about the rest?
AtleastItried
Posts: 51
Joined: 03 Mar 2017, 04:51

Re: Cant move and create files?

03 Mar 2017, 14:43

Code: Select all

FileMove, %A_WorkingDir%\Limited.exe, %A_Programs%\startup
FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P, %A_Programs%\SteamUI.txt
FileAppend,K: HSKOD-DJ820-MLAO8-B4D7P, %A_Desktop%\SteamUI.txt
this works, thanks
User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: Cant move and create files?

03 Mar 2017, 14:48

AtleastItried,
good job! We always look to help others, but sometimes we just give them a "nudge" to the solution, lol!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 269 guests