Seite 1 von 1

copy does not recurse subdirectories on extraction?

Verfasst: 11 Mär 2015, 18:14
von SisterOfMercy
I was reading this: https://download.uib.de/opsi4.0/doc/htm ... #_commands

For a program with a really large number of small files (fritzing) I am trying to unpack a .zip file. This zip file is packed recursively and includes subdirectories.

Code: Alles auswählen

[Files_install_64]
copy -sx "%ScriptPath%\files\x64.zip" "$InstallDir64$"
It does not copy the directories correctly, and even the files which should be in the 'root' of the InstallDir are not correct.
I get this error in the log file:

Code: Alles auswählen

Error: copy of c:\opsi.org\tmp\decompr\bins\ to C:\Program Files\Fritzing\ not possible. CreateFile for reading, File Error No. 3 (The system cannot find the path specified.<)
I first tried it only with '-x', but that did not work either. With LogLevel set to 9 the log doesn't contain any more useful information.

https://svn.opsi.org/filedetails.php?re ... osfunc.pas
Somewhere around the first hit for 'archive'.
And this refers to https://svn.opsi.org/filedetails.php?re ... pinter.pas, and that file calls UNZIPD32.DLL to unzip..

Uh, so this is not going to work anytime soon? Or am I doing something wrong? (again ;) )

Re: copy does not recurse subdirectories on extraction?

Verfasst: 12 Mär 2015, 14:32
von wolfbardo
Ok the docs

Code: Alles auswählen

x → x-tract
If a file is a zip archive it will be unpacked (Xtracted) on copying.
are misleading. It is a very old opsi-winst feature when we were copying file by file from snapshots and only for extracting files, not archives.

See viewtopic.php?f=5&t=5140

regards,
bardo wolf

Re: copy does not recurse subdirectories on extraction?

Verfasst: 12 Mär 2015, 16:35
von SisterOfMercy
I did search for any issues with copy x, but of course the search ignores the 'x'. :(
And '-x' also does not work in the search function.
d.oertel hat geschrieben:Die bisherige Implementation ist sehr alt (pre opsi) und stammt aus der Zeit als Serverplattenplatz sehr teuer war und daher die Installationsdateien auf dem Server komprimiert abgelgt wurden.
Better start making a history on the website. The history of unigraphics is also very interesting, with the 'first CAD workstation under 100.000 dollar' somewhere in the '80s.

However, I think the -x feature still has its uses, fritzing is one example of a lot of small files in a zip file. I think the speedup can be quite large in such cases. Eh, instead of copying a lot of files via SMB, it opens the zip file from SMB and extracts it to the installdir.