Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynaZIP problem
Message
From
01/06/2001 12:09:11
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00512975
Message ID:
00513884
Views:
17
Yup - that fixed it. Great!!!

I noticed that if you use the multi-volume disk option, when it prompts for disk two or disk three and you don't change the floppy, it will overwrite the data you just entered. I have set the following properties to .t. (.lmv_wipe, .lmv_SubDir, .lmv_SysHide ). I didn't find a property that would check for this and warn the user. Any suggestion other than issue a strong warning in the users procedure manual.

Thanks
Gaylen


>Found the problem. Substitute the following code in the DynaZip.PRG file:
>PROTECTED PROCEDURE CreatePath
>	lparameter tcPath
>	if len(tcPath) = 3 and right(tcPath, 1) = "\"
>		return .t.
>	endif
>	local lnRetVal, laFiles[1]
>	lnRetVal = adir(laFiles, tcPath, "D")
>	if lnRetVal = 0
>		md (tcPath)
>	endif
>	lnRetVal = adir(laFiles, tcPath, "D")
>	return (lnRetVal > 0)
>ENDPROC
>
>That will let you create zip files at the root level.
>
>As for spanning diskettes, go ahead and set the option to span diskettes. If only one disk is needed, the zip operation would still work.
>
>>Mark - Thanks for your quick response. I never got it to create a zip file on the root drive of any of the drive letters. As a fix, if they select only a drive letter ie(a: b: D:), I just create a subdirectory for them called "Backup" on that drive. Seems to work.
>>
>>Most of the backups will be going to the floppy drive. There will be a requirement for spanned disk as the file sizes grow. Is there any way to tell if you need to use spanned disks and set it programatically as opposed to having the user make that selection at the time they create the backup.
>>
>>
>>Thanks ever so much.
>>Gaylen Jungling
>>
>>
>>
>>
>>>Do this instead:
>>>lcFileDestination = getdir()
>>>
>>>*** determine if use cancelled out of the program
>>>If !empty(lcFileDestination)
>>>   lcDirSelected = addbs(lcFileDestination)
>>>Else
>>>   Messagebox("Destination Not Selected" ,16 ,"Warning")
>>>   return
>>>Endif
>>>
>>>
>>>For zipping to the A: drive, are you using the disk spanning option? If not, are you sure your zipfile is small enough to fit on 1 diskette?
>>>
>>>As for selecting a CD-RW, I would first create the zip file in a temp location, then copy it to the CD-RW. This is what I do.
>>>
>>>>I just purchased Dynazip and am using the wrapper class by Mark from the UT download directory. I want to let the user select the destination of the backup zip file and use the following code out of a click event of a Backup command button.
>>>>
>>>>lcFileDestination = getdir()
>>>>lnlength = len(lcFileDestination)
>>>>
>>>>*** determine if use cancelled out of the program
>>>>If lnLength != 0
>>>> lcFileDestination = left(lcFileDestination,lnlength -1)
>>>> lcdirselected = lcfileDestination+"\"
>>>>Else
>>>> Messagebox("Destination Not Selected" ,16 ,"Warning")
>>>> return
>>>>Endif
>>>>...
>>>>oDZ = newobject('dynazip', 'dynazip.fxp')
>>>>with oDZ
>>>> .cZip_ZipFile = lcdirselected + "sob.zip"
>>>>.....
>>>>....
>>>>If I want to backup to the A: drive or the CDROM drive, the program won't create the backup unless you are directing it to a subdirectory on those two drives.
>>>>
>>>>The error message is #1961 " A subdirectory or file a:\already exists" or in the case of CDROM ...file d:\already exists.
>>>>
>>>>The DynaZIP program and wrapper class is exactly what I needed. I just got the both programs and with about 2 hrs work will have a solution to my backup problem. Special thanks to the excellent class and documentation by Mark McCasland.
>>>>
>>>>Any work arounds or better yet what the heck am I doing wrong?
>>>>
>>>>Gaylen Jungling
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform