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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner Needs Help With VBScript

Status
Not open for further replies.

LibertyGuy

Technical User
Feb 26, 2008
28
US
Hello,

I'm a complete newb at scripting, as in this is my first time ever even attempting it. I've been tasked with (as busy work more or less) creating a vb script that will list the folders inside a "ready to archive" folder, create a csv file, and move the files to a designated folder.

So far this is all I have:

directoryname="\\server\LCS_2\ --THESE CAN ARCHIVE"
Set fso = CreateObject("Scripting.FileSystemObject")
set mainfolder=fso.GetFolder("\\server\LCS_2\ --THESE CAN ARCHIVE")
Set foldercollection = mainfolder.SubFolders
For Each folder In foldercollection
Wscript.Echo folder.Name
Next

Even this little bit required some expert advice, as like I said I am a complete beginner with all of this. At any rate, what I have so far is doing what it should; it is listing the contents of said folder. However, I want to filter out folders that start with a period (hidden folders), and I would like for these folders to be ignored altogether.

Any advice is much appreciated with moving these folders and creating a text file of the listing before the move. Please remember that I am not too savvy with this so if you could explain in the most dumb-downed version possible I would be forever greatful.

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top