From frank.westlake:
>From
vjp2.at:
> >I copy like 2gb of very many small files
>(POrtableApps)
> >once a year and it can take several hours.
>In similar cases I've found it is faster to compress and
>archive (ZIP) the files, transfer the single archive,
>then extract and decompress (UNZIP) on the destination
>media.
>I've done this only between Android and
>Linux.
In the above two processors were involved, a PC and an
Android: one creates the archive and the other extracts
it. If you have a single processor (i.e. PC copies to
USB stick) then the act of extracting files on the USB
stick will cause additional transfers to and from memory
across the USB port. It is the additional protocol
required for each transfer that makes multiple small
files so much slower than an equivalent size large file.
So if you unzip to a USB stick you are still
transferring the small files individually and the
overall time might not be much different.
If the USB device is only used for backup or transport
then it is more efficient to transfer an archive to it
and leave it as a single file. When the data is used
transfer the archive to a PC and extract it to a working
directory. When the work is finished archive it and
transfer the archive to the USB stick. I generally use
scripts similar to the following, but these were written
on an Android and are untested.
::::::::::::::::::::::::::::::
:: fromDevice.cmd
Set "device=U:"
Set "archive=work.zip"
Set "workDir=C:\workDir"
copy "%device%\%archive%" "%TEMP%"
MkDir "%workDir%"
ChDir /d "%workDir%"
unzip "%TEMP%\%archive%"
Erase "%TEMP%\%archive%"
Echo Go to work!
::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::
:: toDevice.cmd
Set "device=U:"
Set "archive=work.zip"
Set "workDir=C:\workDir"
zip "%TEMP%\%archive?" "%workDir?\*
copy "%TEMP%\%archive%" "%device%"
Erase "%TEMP%\%archive%"
::::::::::::::::::::::::::::::
Frank