Home / Microsoft / Microsoft DOS / How to run a batch file inside a zip archive from a batch file?
0 Members and 3 Guests are viewing this topic. « previous next »
Pages: 1 ... 3 4 [5]  All - (Bottom) Print
Author Topic: How to run a batch file inside a zip archive from a batch file?  (Read 4099 times)
papayrus
Topic Starter
Rookie



Posts: 33


« Reply #60 on: November 25, 2009, 04:41:53 PM »

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?
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,342

Experience: Familiar
OS: Windows 7

« Reply #61 on: November 25, 2009, 04:51:08 PM »

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)

 8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
papayrus
Topic Starter
Rookie



Posts: 33


« Reply #62 on: November 25, 2009, 04:55:27 PM »

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)
IP logged
papayrus
Topic Starter
Rookie



Posts: 33


« Reply #63 on: November 29, 2009, 06:05:10 AM »

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.
IP logged
Pages: 1 ... 3 4 [5]  All - (Top) Print 
Home / Microsoft / Microsoft DOS / How to run a batch file inside a zip archive from a batch file? « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.116 seconds with 19 queries.