First, all the desired files are counted (like this)
Code: Select all
Loop Files, % foldSelect1 "\*.pdf", R ; Recurse into subfolders.
countPDF += 1
Code: Select all
Loop Files, % foldSelect1 "\*.pdf", R ; Recurse into subfolders.
{ FileCopy % A_LoopFileFullPath, % foldSelect2, 1
countPDF1 += 1
files .= A_LoopFileName "`n"
}
countPDf1 = 1498 (pcs)
The csv-file contains 1498 filenames
but in the result directory (windows), it is only 1496 pcs (two files is missed)
If I only copy a few files (eg 15) I got the same value in Explorer as from the AHK- program.
I have tried ErrorLevel
Code: Select all
FileCopy % A_LoopFileFullPath, % foldSelect2, 1 ; Skriv över befintilga filer
If ErrorLevel
MsgBox ,, Rad %A_LineNumber% -> %A_ScriptName%, % countPDF1 "`n" A_LoopFileName
Right now, I have no idea how to find the missed files