Showing results for storage - Scripting Blog [archived]

Feb 18, 2005
Post comments count0
Post likes count0

How Can I List the Files in a Folder and All Its Subfolders?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I list all of the files in a folder, as well as all the files in any subfolders of that folder?-- MA Hey, MA. This is a question we get asked quite a bit, and one which have avoided answering up till now. That’s because there is no nice, simple answer to this one: a script that can carry out this task is bound to be a...

Scripting Guy!VBScriptstorage
Feb 11, 2005
Post comments count0
Post likes count0

How Can I Use a Wildcard Character to Delete Folders?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I delete folders based on a wildcard character? For example, how can I delete all the folders whose name starts with December?-- RR Hey, RR. Well, that depends. If you’re running Windows XP or Windows Server 2003, you can actually use a wildcard character to identify and then delete all the folders whose name starts w...

Scripting Guy!VBScriptstorage
Feb 1, 2005
Post comments count0
Post likes count0

How Can I Change the Working Folder of a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! My script needs to have the same working folder as the application that the script starts. How can I change the working folder of a script?-- JM Hey, JM. You can change the current (or working) folder of a script simply by setting the value of the Wscript Shell object’s CurrentDirectory property. (Note. The CurrentDirectory p...

Scripting Guy!VBScriptstorage
Jan 24, 2005
Post comments count0
Post likes count0

How Can I Determine the Next Available Drive Letter on a Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I determine the next available drive letter on a computer?-- TW Hey, TW. Interesting question, and one that crops up from time-to-time. In the old days, when users only had drives A, B, and C, this was easy; you could pretty much guess that any drive letter other than those three would be available. Nowadays, though, ...

Scripting Guy!scripting techniquesVBScript
Jan 14, 2005
Post comments count0
Post likes count0

How Can I Tell if a Folder Has Any Files with a Specific File Extension?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I verify whether or not any files with a specific file extension exist in a folder?-- GM Hey, GM. This is actually a pretty easy thing to do. All we have to do is write a WMI query that includes the path of the folder we want to check as well as the file extension we’re checking for. For example, this script retrieves...

Scripting Guy!scripting techniquesVBScript