?
Solved

AUto unzip .vbs task 2003 sever

Posted on 2007-10-21
11
Medium Priority
?
680 Views
Last Modified: 2008-01-30
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
Comment
Question by:eteran
  • 6
  • 5
11 Comments
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 20118864
>> I created a batch file .vbs
Windows batch file should have .cmd or .bat extensions NOT vbs.
0
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 20118906
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
 

Author Comment

by:eteran
ID: 20119514
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 20119630
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
 

Author Comment

by:eteran
ID: 20120021
Okay so do I do a batch cmd or vbs file with what we are tlaking about.
0
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 20120029
.cmd batch file.
0
 

Author Comment

by:eteran
ID: 20120495
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
 
LVL 26

Accepted Solution

by:
Farhan Kazi earned 2000 total points
ID: 20120513
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
 

Author Comment

by:eteran
ID: 20128489
oKAY GOT IT TO WORK
0
 

Author Comment

by:eteran
ID: 20128491
Now I have to do the unzip
0
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 20166576
Any update?
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question