![]() ![]() What about the subfolders of C:\Scripts? We’ll get to those in a second. Once the connection has been made, we reference the Files property in order to retrieve a collection of all the files found in C:\Scripts: Set colFiles = objFolder.Files After the objects have been created we then assign the path of the starting folder (C:\Scripts) to a variable named strStartFolder: strStartFolder = "C:\Scripts"įrom there we use the following line of code (and the FileSystemObject) to bind to the starting folder: Set objFolder = objFSO.GetFolder(strStartFolder) (Although, in all fairness to Dean he probably would explain the thing if the cows would just let him go.) By contrast, the Scripting Guy who writes this column will note we start out by creating instances of the Scripting.Dictionary and Scripting.FileSystemObject objects. For example, none of the other Scripting Guys are going to explain to you how the preceding script works. No doubt many of you are sitting there wondering, “Gee, what is it that separates the successful Scripting Guy from his less-successful peers?” One difference is the fact that the Scripting Guy who writes this column takes the time to explain what he’s doing, and why. Set objFolder = objFSO.GetFolder(Subfolder.Path) If InStr(objDictionary.Item(strFileName), " ") ThenĪrrPaths = Split(objDictionary.Item(strFileName), " ") ShowSubfolders objFSO.GetFolder(strStartFolder) ObjDictionary.Item(strName) = objDictionary.Item(strName) & " " & strPath If Not objDictionary.Exists(strName) Then Set objFolder = objFSO.GetFolder(strStartFolder) Set objFSO = CreateObject("Scripting.FileSystemObject") Perhaps his most notable achievement to date is the following script, one that lists all the duplicate files in a folder and its subfolders: Set objDictionary = CreateObject("Scripting.Dictionary") The Scripting Guy who writes that column has long been a successful individual in the fields of Medicine, Business, Education, the Arts & Sciences, Research, Healthcare, Law, Engineering, and many other professions. As long as you’re here, however, could you do us a favor? Could you read the following rough draft and tell us what you think: Of course, the downside to receiving this prestigious honor is that we can’t answer your question, GK, at least not today. Which can mean only one thing: the invitation was meant for the Scripting Guy who writes the column, the only Scripting Guy who truly qualifies as a successful individual “in the fields of Medicine, Business, Education, the Arts & Sciences, Research, Healthcare, Law, Engineering, and many other professions.” It’s about time the Scripting Guy who writes this column gets the recognition he so richly deserves.Įd itor’s Note: Didn’t the Scripting Guy who writes this column just recently admit to successfully hiding a present from himself? Does that sound like the action of the world’s most highly accomplished Professional? We didn’t think so, either. The point is this: does any of that sound like the actions of the world’s most highly accomplished Professionals? We didn’t think so, either. Peter Costantini?!? In Who’s Who?!? You’re kidding, right? Scripting Guy Peter Costantini – oh, come on now, be serious. ![]() If “incinerated” means the same as “melted” then, yes, the cheese had melted.) Scripting Guy Jean Ross once melted cheese under the broiler by putting the casserole in the oven, turning the broiler on high, then returning several hours later to see if the cheese had melted. Scripting Guy Dean Tsaltas was once cornered (and held captive) by a herd of cows. ![]() What’s that? OK, sure, technically the invitation was sent to the email address that means that – in theory – it could have been intended for any of the Scripting Guys. Inclusion is considered by many as the single highest mark of achievement.” The world’s most highly accomplished Professionals? No wonder the Scripting Guy who writes this column received an invitation! In case you’re wondering, the Madison Who’s Who includes “biographies of the world’s most accomplished Professionals …. That’s because the Scripting Guy who writes this column is working on his biography for inclusion in the “Madison Who’s Who Among Executives and Professionals, Honors Section.” Needless to say, that has to take priority over anything else, including – alas – answering questions about system administration scripting. We have to apologize, but you picked a bad day to ask a question. Hey, Scripting Guy! How can I list all the duplicate files (that is, files with the same file names) in a folder and its subfolders? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |