LibertyGuy
Technical User
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!
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!