VBS Add numbers for each loop
For my VBS script, for e开发者_StackOverflow社区ach loop, I want it to add the number of which loop it's on. Like if it's a site and has an ID, then if it's on loop 1 adds 1 to the ID. I already declared "site" for my script.
What do I do? Do you need to see some of the script?
Not sure what kind of collection you're working with, but you could do something simple like this
Set objFilesystem = CreateObject("Scripting.FileSystemObject")
Set objInputFolder = objFileSystem.GetFolder("c:\temp")
i = 1
For Each objInputFile In objInputFolder.Files
WScript.Echo SITE + i
i = i + 1
Next
精彩评论