[Solved] Why won't this simple file loop work?
Posted: 24 Jan 2020, 03:52
I'm freaking out because yesterday this worked perfectly, but for the past 6 hours it doesn't work.
The message box tells me it's about to copy the proper sound, but then once copied, both sounds are the first sound, but named as expected:
About to copy sound named "does everybody want soup.mp3"
New name will be "16.mp3"
I'm completely stumped. And yes I've quadruple checked that the 2 original sounds are actually different. Can you please help?
[Mod edit: [code][/code] tags added]
Code: Select all
counter := 15
Loop, Files, C:\2 sounds\*.mp3, F
{
MsgBox, 262144, ,
(LTrim
About to copy sound named "%A_LoopFileName%"
New name will be "%counter%.%A_LoopFileExt%"
)
FileCopy, C:\2 sounds\*.mp3, C:\2 sounds copied\%counter%.%A_LoopFileExt%
counter += 1
}
About to copy sound named "does everybody want soup.mp3"
New name will be "16.mp3"
Code: Select all
Directory of C:\2 sounds\
do I lie.mp3
does everybody want soup.mp3
Total 0 folder(s); 2 file(s)
Directory of C:\2 sounds copied\
15.mp3
16.mp3
Total 0 folder(s); 2 file(s)
[Mod edit: [code][/code] tags added]