Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

UGPC & 7zip in batch as alternative for ugzip

Status
Not open for further replies.

RonnyC

Automotive
Oct 12, 2009
49
Hi all.

While upgrading to windows7 64bit, I had some trouble getting the UGzip tool to work. So I decided to try and write a batch file that would do a similar job.
As it turns out it was easier as planned,
it uses the ugpc tool in combination with 7zip ( opensource alt. to winzip). UGPC's output luckily is exactly the input that 7zip needs.

here's the batch file code:


@ECHO OFF

"C:\Program Files\UGS\NX 7.5\UGII\ugpc.exe" %1 > %1.txt
"C:\Program Files (x86)\7-Zip\7z" a -tzip -mx7 %1.zip @%1.txt
del /F %1.txt

Next step is to add a registry key:HKEY_CLASSES_ROOT/shell/zipassy/
and input "C:\ugpc_zip\ugpc_zip.bat" %1 as data

This adds an action called zipassy when you rightclick a file.

doing this automaticly creates a zip file with the selected file and all components.

Obviously you will need to substitute the correct paths according to your setup.

Hope it can be of help to someone.



 
Replies continue below

Recommended for you

correction: HKEY_CLASSES_ROOT/*/shell/zipassy/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor