ProblemYou want to create or delete a folder. SolutionUsing a graphical user interface
Using a command-line interfaceTo create a folder, use the mkdir command (or md for short): > mkdir c:\scripts To remove a folder, use the rmdir command (or rd for short): > rmdir c:\scripts Use the /s option to remove a folder and all files and subfolders contained within it. Use the /q option to bypass the confirmation prompt when using /s. To delete a folder on a remote system, use the psexec command (from Sysinternals): > psexec \\<ComputerName> cmd.exe /c rmdir /s c:\temp To provide alternate credentials with psexec, use the /u and /p options to specify a username and password respectively. Using downloadable softwareIf you want a New Folder option when you right-click in the left pane of Windows Explorer, check out the following tool: http://www.createwindow.com/freeware/newfold.htm. Using VBScript' This code deletes a folder ' ------ SCRIPT CONFIGURATION ------ strFolderPath = "<FolderPath>" ' e.g. "d:\temp" ' ------ END CONFIGURATION --------- set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.DeleteFolder(strFolderPath) WScript.Echo "Successfully deleted folder" |