I don't have a lot of coding experience and I placed this together with some googling and it was working fine but now I would like to write my var number in front of the file name.
I added line 22 and line 31 and it doesn't want to write the var name in front of the filename can anyone tell me why it's not working and maybe show me how I can get it working.
var := 32395
filename := "helloworld.txt"
fileName := var "_" fileName
msgbox % filename
var++
filename := "anotherfile.txt"
fileName := var . "_" . fileName
msgbox % filename
But it looks like you are overwriting the result with the following line SplitPath, url, fileName, at least in your else-branch... perhaps you want to switch these lines?
var := 32395
filename := "helloworld.txt"
fileName := var "_" fileName
msgbox % filename
var++
filename := "anotherfile.txt"
fileName := var . "_" . fileName
msgbox % filename
But it looks like you are overwriting the result with the following line SplitPath, url, fileName, at least in your else-branch... perhaps you want to switch these lines?
I figured out what was wrong with the code the var was cleared when I entered the if function I just made the var a Global and it all works now