loop, files & Filemove problem

Get help with using AutoHotkey and its commands and hotkeys
zzongk
Posts: 2
Joined: 24 Jul 2018, 11:15

loop, files & Filemove problem

16 Aug 2018, 08:09

Hi. Everyone
First time in here!

I faced abnornal result in my script

1. create TXT Files sequentially 01.kkk, 02.kkk, 03.kkk .....
2. try to rename 1-01.kkk, 2-02.kkk, 3-03.kkk ......

results failed to renaming sequentially

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

Last edited by zzongk on 17 Aug 2018, 20:56, edited 6 times in total.
Dave_Scream
Posts: 6
Joined: 01 Jul 2016, 06:06

Re: loop, files & Filemove problem

16 Aug 2018, 10:06

on second line comma should be escaped with `

Code: [Select all] [Download] GeSHi © Codebox Plus

FileName = a1,a2,a3
StringSplit, Split, FileName,`,
loop, *.txt
FileMove, %a_loopfilename%, % Split%a_index% ".kkk"
zzongk
Posts: 2
Joined: 24 Jul 2018, 11:15

Re: loop, files & Filemove problem

17 Aug 2018, 02:24

Sorry my question is edited

Dave_Scream wrote:on second line comma should be escaped with `

Code: [Select all] [Download] GeSHi © Codebox Plus

FileName = a1,a2,a3
StringSplit, Split, FileName,`,
loop, *.txt
FileMove, %a_loopfilename%, % Split%a_index% ".kkk"

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 18 guests