There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijackthis internet internet explorer itunes laptop mac malware motherboard mouse network networking outlook 2007 power printer problem ram restart router screen slow sound trojan usb virus vista vista 32-bit windows windows xp winxp wireless wmp
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Zipping from foxpro


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
kensands's Avatar
Junior Member with 7 posts.
 
Join Date: Sep 2004
Location: london
Experience: Programmer
17-Sep-2004, 10:53 AM #1
Zipping from foxpro
I'm using the following code to zip files from foxpro using powerarchiver as my zipper, I'm having problems with any paths that have spaces even though I am trying to pass quoted paths, any ideas?

parameters filetozip,ziptoname,zippassword

filetozip = '"'+filetozip+'"'
ziptoname = '"'+ziptoname+'"'
if zippassword != ""
zippassword = '-s"'+zippassword+'"' && putting the -s part in here stops it failing when no password is passed.
endif
run C:\PACL\PACOMP -a -c2 -w -q &zippassword &ziptoname &filetozip

return


it works fine as long as there are no spaces in the paths passed but this is not good enough for my needs.

Thanks in advance.
Ken.
kensands's Avatar
Junior Member with 7 posts.
 
Join Date: Sep 2004
Location: london
Experience: Programmer
20-Sep-2004, 07:23 AM #2
Or
if anyone can point me toward a free zip program with an open com interface that I can use programmaticaly that would do fine.

cheers.
Chicon's Avatar
Computer Specs
Distinguished Member with 6,695 posts.
 
Join Date: Jul 2004
Location: 50° 34' 07.13" N - 04° 10' 23.
Experience: Second socks retriever
20-Sep-2004, 09:54 AM #3
Hi kensands,

I use PKZIP DOS version 2.5 for my batch scriptings. It works nice and is free.
You can download from http://www.premier.net/~chambers/ziptrac.htm
You can find there PKZIP25 for 32-bit command line
kensands's Avatar
Junior Member with 7 posts.
 
Join Date: Sep 2004
Location: london
Experience: Programmer
21-Sep-2004, 06:08 AM #4
Thanks I'll give it a go, I've tried 7-zip, izarc, camunzip, and ofcourse powerarchiver with no success so far, unzipping has been fine it's just zipping, I've found I can zip as long as both input and zip fle are 8 characters or less but this is not nearly sufficient.

I'll report back on how pkzip goes, it may well be a fox issue.
kensands's Avatar
Junior Member with 7 posts.
 
Join Date: Sep 2004
Location: london
Experience: Programmer
21-Sep-2004, 06:25 AM #5
ok still having issues, can someone help me out here?

I need to zip a long filenamed file with possible spaces from a network drive to a different network drive long named possible spaced zip file.... Phew... breathe....

so in fox using any zip program you like, preferably free, since there are plenty of free ones zip me up a:
G:\some directory\in a long path\long filename file.txt
to a
H:\another directory\also pretty long\nice long zipname.zip

when I try it either the run command fails or it flips up the black command box real quick and obviously fails to do anything. (made even more obvious by the lack of resulting zip file)

I'd also prefer it to work without the /N bit after RUN, because if it does not wait it will try to kick into a second zip process which will probably fail (trying to zip to the same zip file on a second run is possible)

ok challenge set, how hard can it be???
kensands's Avatar
Junior Member with 7 posts.
 
Join Date: Sep 2004
Location: london
Experience: Programmer
21-Sep-2004, 09:05 AM #6
Ok I think I'm there now. seems the issues were mainly down to me not being careful enough with spaces and the use of /N

so I've got it working with /N and added a keyin() wait based on the 3meg per sec zip speed my computer manages + a bit for safety, yes I know thats a pretty crappy way, but it'll do for now and I'll make it look for the process to have finished soon.

thats easy right?

cheers.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 10:32 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.