Your technology certification is waiting. Enroll in Cloud Class ®
strFolder = "\\SomeServer\SomeShare\SomeFolder"
Set fso = CreateObject("Scripting.FileSystemObject")
For Each objFile In fso.GetFolder(strFolder).Files
Wscript.Echo "Deleting file: " & objFile.Path
For Each objSubfolder In fso.GetFolder(strFolder).Subfolders
Wscript.Echo "Deleting folder: " & objSubfolder.Path
Open in new window
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
for %%a in ("%Folder%\*.*") do (
ECHO del "%%~a"
for /d %%a in ("%Folder%\*.*") do (
ECHO rd /s /q "%%~a"
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.