Copy files to specified folders depending on their filename?
Moderators: Hacker, petermad, Stefan2, white
It's not working yet, and I am trying to find out where it goes wrong.Ovg wrote:2hiccup
I have found and fixed a small bug. Please re-download file
from my post. Link is the same.
I am wondering if the AHK script you supplied is working on my system at all.
When I create a small test script myself to see if AHK works, and I select 'Run script' on it, it works, and a small AHK icon appears in the taskbar.
But when I select 'Run script' on your (untouched) script, nothing seems to happen, and no icon appears in the taskbar.
Should the icon appear, or shouldn't I worry about that?
(In case it's important: I installed AHK with the (recommended) setting: Unicode 32-bit)
2hiccup
Icon appears only while script is working. In case of a small quantity of entries in ini file you might overlook it
Script works only when TC or you pass list of files as command line parameter.
Configure ini file something like
[0]
Overwrite=1
[1]
Keys=Cat/Dog/Mouse/Degus
Target=g:\Animals
[2]
Keys=Beef/Apple/Orange/Fruit
Target=g:\Food and Drink
FilesCopy.ahk from 14-05-2018 07:47
Icon appears only while script is working. In case of a small quantity of entries in ini file you might overlook it
Script works only when TC or you pass list of files as command line parameter.
Configure ini file something like
[0]
Overwrite=1
[1]
Keys=Cat/Dog/Mouse/Degus
Target=g:\Animals
[2]
Keys=Beef/Apple/Orange/Fruit
Target=g:\Food and Drink
FilesCopy.ahk from 14-05-2018 07:47
Last edited by Ovg on 2018-05-14, 12:12 UTC, edited 1 time in total.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
I've got the button working, but immediately after performing the action, AHK gives a popup error: "Can't open FilesCopy.ini"
I checked to be certain; FilesCopy.ini is present in the same folder as the script. (I created C:\AHK scripts for that purpose)
One thing that is different from your tutorial:
You mentioned that the ini should be saved in UTF-16 with BOM.
I tried that both with notepad++ and Ted Notepad, but neither presents that specific option.
Ted Notepad offers:
ANSI
UTF-8
Unicode
Unicode, Big Endian
BOM (on/off)
Notepad++ offers similar options, but seems to have two Unicode settings named: UCS-2 BE and UCS-2 LE
But neither offers UTF-16
Could that be the problem here?
(probably not, since I have tried all encodings, and none works)
I checked to be certain; FilesCopy.ini is present in the same folder as the script. (I created C:\AHK scripts for that purpose)
One thing that is different from your tutorial:
You mentioned that the ini should be saved in UTF-16 with BOM.
I tried that both with notepad++ and Ted Notepad, but neither presents that specific option.
Ted Notepad offers:
ANSI
UTF-8
Unicode
Unicode, Big Endian
BOM (on/off)
Notepad++ offers similar options, but seems to have two Unicode settings named: UCS-2 BE and UCS-2 LE
But neither offers UTF-16
Could that be the problem here?
(probably not, since I have tried all encodings, and none works)
I record a gif how it works
https://yadi.sk/i/QRt8nr2Y3VswqL
Check start path in button config - it should be directory with script and ini file
TOTALCMD#BAR#DATA
e:\qqq\www\FilesCopy.ahk
%UL
C:\Program Files\AutoHotkey\AutoHotkey.exe,1
FilesCopy
e:\qqq\www\
-1
https://yadi.sk/i/QRt8nr2Y3VswqL
Check start path in button config - it should be directory with script and ini file
TOTALCMD#BAR#DATA
e:\qqq\www\FilesCopy.ahk
%UL
C:\Program Files\AutoHotkey\AutoHotkey.exe,1
FilesCopy
e:\qqq\www\
-1
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
2hiccup
https://yadi.sk/i/FnEtKQ_G3Vt4Gi
https://yadi.sk/i/FnEtKQ_G3Vt4Gi
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64