As per Documentation - Language Reference - Operators:
&
Concatenates/joins two strings.
&=
Concatenation assignment.
AutoIt allows concatenation of string to integer. Example using For...To...Step...Next loop:
Global Const $g_iMax = 5
Global Const $g_sPathSrc = 'C:\Users\Lambeezy\Documents\Folder\ReferentGroup.txt'
Global Const $g_sPathDst = 'C:\Users\Lambeezy\Documents\DifferentFolder\'
Global $g_sPathCur = ''
For $i1 = 1 To $g_iMax
$g_sPathCur = $g_sPathDst & $i1
FileCopy($g_sPathSrc, $g_sPathCur)
Next
Alternatively StringFormat()
can be used:
Global Const $g_iMax = 5
Global Const $g_sPathSrc = 'C:\Users\Lambeezy\Documents\Folder\ReferentGroup.txt'
Global Const $g_sPathDst = 'C:\Users\Lambeezy\Documents\DifferentFolder\%s'
Global $g_sPathCur = ''
For $i1 = 1 To $g_iMax
$g_sPathCur = StringFormat($g_sPathDst, $i1)
FileCopy($g_sPathSrc, $g_sPathCur)
Next
Related.