ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Batch files auto unzip (https://www.excelbanter.com/excel-programming/310756-batch-files-auto-unzip.html)

Jonathan Jones

Batch files auto unzip
 
Has anyone come across this problem in XP
with creating a batch file, by first creating a text file
then closing it. Then output using wzunzip.exe as
follows:-

Open "D:\WMSCall\extract.txt" For Output As #1
Print #1, "D:\WMSCall\wzunzip.exe
D:\WMSCall\ZippedFiles\" & Carrier & "\" & fileStr & _
FileYearStr & ".zip
D:\WMSCall\ZippedFiles\All\"
Close #1
'Rename .TXT to .BAT to enable remote execution
Name "D:\WMSCall\extract.txt"
As "D:\WMSCall\extract.bat"
'Run extract.bat
runBat = Shell("D:\WMSCall\extract.bat")

When trying to run this in xp it does not work.
Can anyone offer any ideas! thanks in advance


Dave Peterson[_3_]

Batch files auto unzip
 
Instead of making a .bat file, maybe you could just shell out to the unzipping
program.

Ron de Bruin has some code to do the opposite (zip--not unzip) at:

http://www.rondebruin.nl/zip.htm

maybe you can pick it apart and modify parts of it.



Jonathan Jones wrote:

Has anyone come across this problem in XP
with creating a batch file, by first creating a text file
then closing it. Then output using wzunzip.exe as
follows:-

Open "D:\WMSCall\extract.txt" For Output As #1
Print #1, "D:\WMSCall\wzunzip.exe
D:\WMSCall\ZippedFiles\" & Carrier & "\" & fileStr & _
FileYearStr & ".zip
D:\WMSCall\ZippedFiles\All\"
Close #1
'Rename .TXT to .BAT to enable remote execution
Name "D:\WMSCall\extract.txt"
As "D:\WMSCall\extract.bat"
'Run extract.bat
runBat = Shell("D:\WMSCall\extract.bat")

When trying to run this in xp it does not work.
Can anyone offer any ideas! thanks in advance


--

Dave Peterson


Jonathan Jones

Batch files auto unzip
 

Dave

Thanks for the reply will advise or post the answer, when found

Cheers
Jonathan


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Ron de Bruin

Batch files auto unzip
 
Hi Jonathan

Maybe this is useful
http://www.rondebruin.nl/unzip.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonathan Jones" wrote in message ...

Dave

Thanks for the reply will advise or post the answer, when found

Cheers
Jonathan


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 12:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com