Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Xceed ZIP error 510 backing up to Removable USB Key

Sort Posts: Previous Next
  •  12-03-2007, 11:24 AM Post no. 5739

    Xceed ZIP error 510 backing up to Removable USB Key

    Hi

    I'm using Xceed Zip Compression Library v6.1 as a ActiveX component in CBuilder 4.

    When I call the following code to backup to the 'H:' Drive (a removable USB Key) it fails giving the error 510 (xerCannotUpdateAndSpan). It fails on the second call to the zip function. There is plenty free space on the USB key (250 megs) and and the backup file size is only ~1 meg. The code works fine if I backup to a network drive 'K'. Below is the code that I am using.... any Ideas :)


    void __fastcall TForm1::Button1Click(TObject *Sender)
    {
    int Error;
    AnsiString ZipFileName = "H:\\TestBackup.zip";
    //AnsiString ZipFileName = "K:\\TestBackup.zip";
    DeleteFile(ZipFileName);
    XceedZip1->ZipFilename = ZipFileName;

    XceedZip1->FilesToProcess = "C:\\winnt\\MyConfigs.ini";
    Error = XceedZip1->Zip();
    if (Error != 0)
    {
    ShowMessage("Failed " + String(Error));
    return;
    }

    XceedZip1->FilesToProcess = "C:\\temp\\data\\*.*";
    //----------------------------------------------------------------------------------
    Error = XceedZip1->Zip(); //------------- Fails here reporting error 510
    //----------------------------------------------------------------------------------

    if (Error != 0)
    {
    ShowMessage("Failed " + String(Error));
    return;
    }
    ShowMessage("Backup created");
    }


    object XceedZip1: TXceedZip
    Left = 168
    Top = 0
    Width = 32
    Height = 32
    ControlData = {
    0003000008000200000000000300060000000800020000000000030000000000
    0300180000000800020000000000080002000000000007000000000000000040
    070000000080409246410300000000000300000000000300000000000B000000
    0B00FFFF0B0000000B0000000B0000000B00000008000200000000000B00FFFF
    0800020000000000080002000000000003000200000003000A0000000B000000
    0B00000008000200000000000800020000000000080002000000000003000000
    0000080002000000000008000200000000000B00000008000200000000000800
    02000000000008000200000000000800020000000000}
    end
  •  12-05-2007, 9:41 AM Post no. 5740 in reply to 5739

    Re: Xceed ZIP error 510 backing up to Removable USB Key

    From the property's documentation ("<a href="http://doc.xceedsoft.com/products/Xceedzip/SpanMultipleDisks_property.html">SpanMultipleDisks</a> property"):

    "When SpanMultipleDisks is set to xdsAlways or xdsRemovableDrivesOnly and that a removable drive is being written to, you can only use the Zip method to create a new spanned zip file. Once the spanned zip file has been created and contains files, no more files can be added to, or replaced in it."

    As a workaround, set the SpanMultipleDisks property to xcdDiskSpanning.xdsNever when you are zipping on a USB Drive.
    Charles Bérubé-Rémillard
    Technical Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.