Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

vbscript to use check if a folder exists in remote computer

$
0
0

Hi,

I need to enumerate/check in the remote computer if a folder with name "myfolder" exists or not.

Function ReportFolderStatus(fldr) Dim fso, msg Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FolderExists(fldr)) Then msg = fldr & " exists." Else msg = fldr & " doesn't exist." End If ReportFolderStatus = msg End Function

I got this above function code on the net, however, this will need to be fed a path to the folder to search for.

In my case, I do not know the path of the folder I'm searching for. I only know the folder name.

Once, I find the folder with the name, I need to then get its path as well.

~TIA


- thestriver


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>