Hi there.
I am using the filesystem object to obtain a list of directories and files within a directory.
Each example shows me how to produce a complete list using a For Each statement eg:
For each file in myFolder.files........
some code ......
Next
What if I want it to just give me the first item in the list?
I tried a Do while and counting the filesystem object but came unstuck.
Any help appreciated - I clearly am crap at my basic VBscripting loops ands tatements but its been so long since I actually learnt the **** stuff and these days I reuse so much of the code I wrote eons ago.
Thanks
I am using the filesystem object to obtain a list of directories and files within a directory.
Each example shows me how to produce a complete list using a For Each statement eg:
For each file in myFolder.files........
some code ......
Next
What if I want it to just give me the first item in the list?
I tried a Do while and counting the filesystem object but came unstuck.
Any help appreciated - I clearly am crap at my basic VBscripting loops ands tatements but its been so long since I actually learnt the **** stuff and these days I reuse so much of the code I wrote eons ago.
Thanks