Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List All the Files in a FolderContent of List All the Files in a Folder.vbsMD5 Hash: 15C81E53E95DF5610758200505009B73 |
||
' Description: Returns a list of all the files in the Scripts folder. If the computer has more than one scripts folder (for example, C:\Scripts and D:\Scripts), files will be returned from each of these folders.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colFiles = objWMIService. _ ExecQuery("Select * from CIM_DataFile where Path = '\\Scripts\\'") For Each objFile in colFiles Wscript.Echo objFile.Name Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |