Extreme file and folder scripting: Listing a directory tree recursively - Day 3 Bonus script: Using WMI with LIKE- August 13, 2004 When I showed these scripts to Dean, he thought there had to be an easier way to recurse through a directory tree with WMI, and he found it. The only caveat is that you must run it on Windows XP or Windows Server 2003. This is because WMI Query Language, the SQL dialect that you use with the ExecQuery method of SwbemServices, first added the LIKE keyword in Windows XP (see http:msdn.microsoft.comlibraryen-uswmisdkwmilike_operator.asp). In this case, LIKE enables you...http://blogs.msdn.com/gstemp/archive/2004/08/13/214336.aspx Extreme file and folder scripting: Listing a directory tree recursively - Day 2 Using WMI- August 11, 2004 BabyScript Now that we've glanced at recursion out of the corner of our eye (on Day 1) and lived, it's time to stare straight-on into the unspeakable horror of the Medusa Code. If you have sunglasses, please put them on now. If you try to speak its name, Files-list-recurse-wmi.vbs, we won't be responsible for what might happen to your tongue. strComputer = "." strDrive = "c:" strPath = "ff" 'Use double backslashes in path if necessary strPathAlt = Replace(strPath, "",.http://blogs.msdn.com/gstemp/archive/2004/08/11/213028.aspx Extreme file and folder scripting: Listing a directory tree recursively. Day 1 Using FilesSystemObject- August 10, 2004 BabyScript If you attended Day 3 of the Scripting Week webcasts, "Scripting Files and Folders Makes Me Happy" http:go.microsoft.comfwlinkLinkId=30795, you may recall an odd and vaguely menacing script in the second section on WMI. It bristled with strange code and was labeled "Bonus: listing a folder tree," but we didn't discuss it. As Dr. Scripto said, merely looking at it could turn you to stone. OK, so Dr. Scripto exaggerates a little. But we're going to call..http://blogs.msdn.com/gstemp/archive/2004/08/10/212113.aspx |