reyreyreyes
Technical User
Hi all
I'm brand new to VBScript, but came across this forum during my search for help on finding a way to copy a file automatically.
Anyway, I found that (thanks to people here), but I'm curious about one thing. Why is it, in this portion of code:
Can I replace the 'g' with 'f' or any other letter and it still work? How does it know that when I'm saying 'for each g' that I mean each file? Does it just assume whatever letter/word is there is a nickname for each file within the collection I'm referring to?
Sorry if this is a stupid question, but I don't get it, unless what I said above is right!
Thank you!
I'm brand new to VBScript, but came across this forum during my search for help on finding a way to copy a file automatically.
Anyway, I found that (thanks to people here), but I'm curious about one thing. Why is it, in this portion of code:
Code:
for each g in ofolder.files
if strcomp(left(g.name,2),"Le",1)=0 then
objFso.copyfile g.path,flDestination,true
Can I replace the 'g' with 'f' or any other letter and it still work? How does it know that when I'm saying 'for each g' that I mean each file? Does it just assume whatever letter/word is there is a nickname for each file within the collection I'm referring to?
Sorry if this is a stupid question, but I don't get it, unless what I said above is right!
Thank you!