If you feel AHK is great for this, what can I do to make it most efficient
!if, where are the areas I should avoid ahk for?
When I have posted in the past about:
Fileread() fiilewrite() abaout plain txt files, its an easy function and works. (if I dont use the right names, I dont have sintax in front of me)
but if I ask about:
moving directories
copying files, or directory trees
find and replace functions
I received most responses telling me to use r/PowerShell
Its an open question on purpose to a degree, I dont know if theres a reason I was recommended this but it wouild appear there are areas of file admin that AHK just doesnt do as well as windows/python.
I know the ahk language better than others like powershell, there for it limits my abilities, and at the same time I instinctually avoid ahk for file stuff because of the advice I received.
Any insight is appreciated. If you have a why, or if I should look twice at capabilities in this area becauase maybe the advice I was given was wrong
Regarding AHK and file management (moving/renaming/writing)…
Regarding AHK and file management (moving/renaming/writing)…
Last edited by BoBo on 01 Jul 2022, 02:54, edited 1 time in total.
Reason: Changed the novel'ish subject line: "Question: I hear a lot of feedback regarding AHK and file management (moving/renaming/writing), it seems some things ahk"
Reason: Changed the novel'ish subject line: "Question: I hear a lot of feedback regarding AHK and file management (moving/renaming/writing), it seems some things ahk"
Re: Question: I hear a lot of feedback regarding AHK and file management (moving/renaming/writing), it seems some things
Here is some suggestions:
Read here for full documentation
FileMove to move and/or rename files.
FileMoveDir to move and/or rename directories.
FileCopy to copy files.
FileCopyDir to copy directories.
FileRead to read from a file.
FileAppend to append text to a file.
FileObject offers several useful methods for reading & writing files.
InStr for searching strings.
StrReplace for sub-strings replacements.
Read here for full documentation
FileMove to move and/or rename files.
FileMoveDir to move and/or rename directories.
FileCopy to copy files.
FileCopyDir to copy directories.
FileRead to read from a file.
FileAppend to append text to a file.
FileObject offers several useful methods for reading & writing files.
InStr for searching strings.
StrReplace for sub-strings replacements.
Re: Question: I hear a lot of feedback regarding AHK and file management (moving/renaming/writing), it seems some things
If you ask in a community that favours PowerShell, of course that will be the answer. If you were given some specific advice about drawbacks of using AutoHotkey for file management, let's hear it. It is impossible to know whether the advice you were given is accurate without hearing what that advice was.
Re: Question: I hear a lot of feedback regarding AHK and file management (moving/renaming/writing), it seems some things
Main issue I had with filemove on a lot of individual files is it is very slow at a one-by-one move. Move the whole folder if possible.
Another issue I had was moving files over the network or internet; some would fail and filemove doesn't have a built in retry, you can code one though.
I had a lot more success when I started using Robocopy via ahk run command.
Code: Select all
RunWait, %comspec% /c Robocopy "%Path_Source%" "%Path_Destination%"