|
Answer» Here is the path of the working folder. C:\Documents and Settings\Administrator\Desktop\VBS FONT EXTRACT
The folder I want to delete is called fonts and it is at this path. C:\Documents and Settings\Administrator\Desktop\VBS FONT EXTRACT\fonts
Just to clarify I used the code for deleting in a new vbs script I didnt put it with the main one yet its all alone in one vbs file. Is that wrong?I thought you were adding the snippet to your existing script. The WshShell NEEDS to be created in a new script:
Code: [Select]Set WshShell = CreateObject("Wscript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set fl = fso.GetFolder(WshShell.CurrentDirectory & "\VBS FONT EXTRACT\fonts") fl.Delete(True)
That did it. I'm gonna take a break hope you dont mind if I ask a few more questions later. I will try to get this FIGURED out but I may still need some help maybe tommorrow. Thanks again man I appreciate it.
I had to make it like this though just to clarify inorder for it to WORK and delete the fonts folder.
Set WshShell = CreateObject("Wscript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set fl = fso.GetFolder(WshShell.CurrentDirectory & "\fonts") fl.Delete(True)Just wanted to say THANK you once again to sidewinder. Because of you I learned and I am now working with VBS scripts and it is great. People like sidewinder are a great contribution to any society weather it be alien or human. 100% excellent. I am smarter because of sidewinder. Thank You very much.
|