Extract archive with XAD plugin
Re: Extract archive with XAD plugin
ok find i have added "Changedirectory" before open archive and it work
Re: Extract archive with XAD plugin
I had tried to add the Volume to the PathPart. Something like "RAM:"..PathPart(...
Re: Extract archive with XAD plugin
Bizarre, i get error during extraction and all files are not extracted...
Seems XAD not extract empty drawers... and i have the same problem with CopyFiles().
Andreas : could you add this features for next version please for XAD and CopyFiles() ?
Seems XAD not extract empty drawers... and i have the same problem with CopyFiles().
Andreas : could you add this features for next version please for XAD and CopyFiles() ?
Last edited by papiosaur on Wed May 17, 2023 3:41 pm, edited 1 time in total.
Re: Extract archive with XAD plugin
That is a problem with my script. It needs to check the type with xad.GetFileAttributes() before extracting or creating a directory.
Re: Extract archive with XAD plugin
Please try this:
Code: Select all
filename$="test.lha"
If Not Exists(filename$) Then DebugPrint(filename$,"not found")
xad.OpenArchive(1, filename$)
XAD_ARCHIVE = xad.GetObjectType()
numentries = GetAttribute(XAD_ARCHIVE, 1, #XADATTRNUMENTRIES)
For Local k = 0 To numentries - 1
Local file$=xad.GetFileAtIndex(1, k)
Local path$=PathPart(file$)
DebugPrint(file$)
If Not Exists(path$) And Not EmptyStr(path$)
MakeDirectory(path$)
EndIf
If xad.GetFileAttributes(1, k).Type = #DOSTYPE_DIRECTORY
MakeDirectory(file$)
Else
xad.ExtractFile(1, k, file$)
EndIf
Next
xad.CloseArchive(1)
Re: Extract archive with XAD plugin
Thanks for this new example, i've tried and i have this error message:
Error creating directory OpenBor/paks
in function MakeDirectory(file$)
Note: this drawer is an empty directory (to save pak file)
Error creating directory OpenBor/paks
in function MakeDirectory(file$)
Note: this drawer is an empty directory (to save pak file)
Re: Extract archive with XAD plugin
i try activate my progress bar but don't work.
It work with DownloadFile() but don't with Extractfile()...
i try to use progress option but don't work.
If you have an idea, i take
It work with DownloadFile() but don't with Extractfile()...
i try to use progress option but don't work.
If you have an idea, i take
Re: Extract archive with XAD plugin
Can you make a little archive so that I can reproduce the error?
Re: Extract archive with XAD plugin
Maybe CopyFile() command is better because i just want to extract all files of an archive to a destination...
xad.extractfile seems very complicated i found no ?
If you have an example of progressbar with CopyFile() command with an archive, i'm interested.
Thanks !
xad.extractfile seems very complicated i found no ?
If you have an example of progressbar with CopyFile() command with an archive, i'm interested.
Thanks !