Click here to Skip to main content
15,880,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone help out with the syntax for this?
Posted
Updated 4-Apr-20 21:46pm
v2

1 solution

Try something like this:

VB
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "sdelete -z D:\temp "
 
Share this answer
 
Comments
vanikanc 8-Feb-11 14:24pm    
What if you are in a file system, we have something that already reads thru files and uses the file system delete method. we are trying to use a cleaner and more reliable method with the sDelete. I plan to replace filesystem.delete with sDelete. would that work?
Nish Nishant 8-Feb-11 14:25pm    
I don't see why it would not work.
vanikanc 8-Feb-11 14:33pm    
I just say, WshShell.Run "sDelete -z", since I am already in the folder that needs files to be delete. I also made sure that the sdelete.exe file also resides in the same folder where I am running this vscript file.
Sergey Alexandrovich Kryukov 8-Feb-11 15:01pm    
Simple as that, a 5, should work.
--SA
vanikanc 8-Feb-11 15:05pm    
But the command window keeps popping each time.
wsShell.Run("sdelete -z"), 2, True -- i tried to set this to 2 to run in silent mode but it still not working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900