/build/static/layout/Breadcrumb_cap_w.png

VB Script to remove a file from the C drive

All,

I need a simple script that can run with our AD logon.bat that searches the C drive and C Drive only for a file called acaddoc.lsp and deletes it wherever it finds it. Most likely it's in the C:\Users folder under whatever profiles are on the machine. But if possible I'd love it to search all of C because it could exist in the program folders as well.

I've never written scripts and if this is something too extensive to post for free, please contact me via PM and I'll happily pay to have it written.

Thanks!

0 Comments   [ + ] Show comments

Answers (3)

Posted by: dchristian 12 years ago
Red Belt
0
There's tons of scripts like this on these forums and Google.

Look for recursive file search.
Posted by: 786_ak 12 years ago
Third Degree Green Belt
0
Try this...

http://www.activexperts.com/network-monitor/windowsmanagement/adminscripts/filesfolders/files/

AK
Posted by: andemats 12 years ago
2nd Degree Black Belt
0
Unless you specifically need a vbs script, you could always go for...
DEL /S
...wich deletes the specified file from all subdirectories.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ