VB Script to fetch the names of sub folders in a folder and write it to a text file

Say for example we have different file upload scenarios and we have kept the files in different folder accordingly and we have to input the file path along with the file name. Doing this manually is tedious. 

So the below VB script simplifies the work, all it does is it reads the sub folder names under the parent folder that we input and writes it to the output by concatenating the both.

VB Script:

If at all you want only the subfolder name to be written to the Output file then

comment out  --- logFile.writeline FilePath
&
remove the comment from --- logFile.writeline(objSubFolder.name)

No comments:

Post a Comment