• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 683
  • Last Modified:

AUto unzip .vbs task 2003 sever

I created a batch file .vbs to run the below posted script. It is not working any clues

unzip -do "C:\Documents and Settings\main\Local Settings\Temporary Internet Files\Content.IE5\AD2JQOZH\s_data[1].zip" -d "C:\MLSDATA\"

0
eteran
Asked:
eteran
  • 6
  • 5
1 Solution
 
Farhan KaziSystems EngineerCommented:
>> I created a batch file .vbs
Windows batch file should have .cmd or .bat extensions NOT vbs.
0
 
Farhan KaziSystems EngineerCommented:
One more thing... I don't see any "-do" switch in UnZip.exe help. I think it should be only "-o"  that is overwrite files WITHOUT prompting.
0
 
eteranAuthor Commented:
Renamed the file to a .cmd. Can you please explain the diffrence between .cmd, .bat and .vbs please. When I run the script dos opens up and diplays the script endless in the dos window. What do I have wroung here

unzip -o "C:\Documents and Settings\root\Local Settings\Temporary Internet Files\Content.IE5\AD2JQOZH\s_data[1].zip" -d "C:\MLSDATA\"

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Farhan KaziSystems EngineerCommented:
Both .cmd and .bat are DOS scripts they can include Windows internal & external commands. BAT extensions are executed in a 16bit VDM (mean executed by the old 16-bit command processor) while .CMD extensions are executed in a 32bit (executed by the new 32-bit cmd processor) VDM. This has implications for scripts that may need to access shared memory from other processes or applications.
(The CMD extension is limited to newer Windows systems and is not recognized in Windows 9x/Me systems.)

The batch files (.cmd or .bat) are relatively simple to follow, but the VBScript files require some explanation to understand how they work together. If you already know Visual Basic or Visual Basic for Applications, VBScript will be very familiar. Even if you don't know Visual Basic, once you learn VBScript, you're on your way to programming with the whole family of Visual Basic languages.

:: Unzip does not process files with special characters (like [ ]).
:: Unzip also dislikes long path
:: So first make Temp folder on C: drive
:: Try this:

Copy /Y "C:\Documents and Settings\root\Local Settings\Temporary Internet Files\Content.IE5\AD2JQOZH\s_data[1].zip"  C:\Temp\s_data.zip

UnZip.exe -o "C:\Temp\s_data.zip" -d "C:\MLSDATA\"

Hope this helps!
Farhan
0
 
eteranAuthor Commented:
Okay so do I do a batch cmd or vbs file with what we are tlaking about.
0
 
Farhan KaziSystems EngineerCommented:
.cmd batch file.
0
 
eteranAuthor Commented:
Trying this code but nothing moves. any Idea. the s_data.zip file is that in that directory doser that matter.

Copy /Y "C:\Documents and Settings\root\Local Settings\Temporary Internet Files\Content.IE5\AD2JQOZH\s_data[1].zip"  C:\Temp\s_data.zip
0
 
Farhan KaziSystems EngineerCommented:
Did you made Temp folder on C: drive? Also make sure 's_data[1].zip' file exists on "C:\Documents and Settings\root\Local Settings\Temporary Internet Files\Content.IE5\AD2JQOZH" path.
0
 
eteranAuthor Commented:
oKAY GOT IT TO WORK
0
 
eteranAuthor Commented:
Now I have to do the unzip
0
 
Farhan KaziSystems EngineerCommented:
Any update?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now