Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Inside A Loop

Status
Not open for further replies.

JacksonYaya

Programmer
Jan 11, 2012
2
US
Hi everyone. I am a programming noob and would like some help with a concept. I want to do this:

Begin loop
Pick a random file and copy it with FSO copy
End loop

What I'm wondering is if I call, say, 400 iterations of this will there be 400 concurrent copies happening, which I imagine would be problematic? If so, I'm thinking that running a check for the source and destination files being equal in size might be a good way to handle it, but any thoughts would be appreciated. Also, I plan on using this
(thanks, Crackoo!) clever sub to create the destination folders, but I see a little circle in front of every instance of FSO on that page. What's that all about? Thanks!
 
FSO is synchronous. It will not start the second copy until the first copy is complete.

And the circle is the letter "o" in the variable name. You can use any variable name you want. FSO, oFSO, MyFileSystemObject, whatever you like. Some coders prefer to prefix their variable names using a lower case letter to describe what the variable will store, in this case the programmer chose the letter "o" to signify "object". Some might use three letters, like objFSO.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top