Jump to content

Recommended Posts

Posted (edited)

Here is a script that will delete files it can do multiple files at the same time.

How to use

1:\ Drag any file or files on to the VBS script

Note this does not send the file or files to the recyle bin but deletes the files permently.

Save As Drag_Drop_Delete.vbs

Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim DelFile
For Each DelFile in Wscript.Arguments : Fso.DeleteFile(DelFile) : Next

Link To Updated DragDropDelete

Edited by gunsmokingman

  • 3 months later...
Posted (edited)

I have updated the script so it now does Files and Folders.

This does not send any thing to the Recyle Bin it deletes.

Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim DelF, GetF
On Error Resume Next
For Each DelF in Wscript.Arguments
Set GetF = Fso.GetFile(DelF) : GetF.Delete()
Next
For Each DelF in Wscript.Arguments
Set GetF = Fso.GetFolder(DelF) : GetF.Delete()
Next

Here is a Rar file of the above code

Edited by gunsmokingman

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...