Tar on Windows XP



Hi

I am trying to create a tar archive on Windows XP with the Perl code below.
However, when I look at the archive created (using WinZip 10.0) all the
directory information is lost, and when I untar it using WinZip all I get is
all the files in the same directory. Can some kind person please tell me how
I can create the tar file so that when it is untar'd the directory
structure will be preserved.

Thanks
David

use Archive::Tar;
use IO::Zlib;
use File::Find;

$dir = "c:/docume~1/david/somedir";
$archive = "c:/docume~1/david/archive.tar";
$tar = Archive::Tar->new;

(@files);
find(\&wanted, $dir);
$tar->add_files(@files);
$tar->write($archive);

sub wanted{
push(@files,$File::Find::name);
}


.



Relevant Pages

  • Re: winzip
    ... Any idea if WinZip decided to stop giving it away or MS ... If you bought OEM ... No version of Windows ... stays functional if you don't pay, there are many people who keep ...
    (microsoft.public.windowsxp.basics)
  • Re: How to prevent xp to display zipped files as folder
    ... Unregister the .zip support in Windows XP by unregistering its DLL file: ... Then click the OK button, Windows XP will no longer show zip files as folders, and you ... Winzip will show zip files as files, ...
    (microsoft.public.windowsxp.general)
  • Re: Zip Files
    ... >> created with WinZip, which you should be able to open with the Windows XP ... >> ZIP Folders feature, and opted for WinZip. ... >> If you have a problem after uninstalling WinZip, ...
    (microsoft.public.windowsxp.general)
  • Re: Bittorrent Mirror - apple.cabi.net
    ... I suspect the problem is with WinZip, ... look like something that should cause a problem with Windows. ... It's part of the base Cygwin install, so you shouldn't need to select extra ... I just tried it with GNU tar on Cygwin (now that the files are accessible to ...
    (comp.sys.apple2)
  • Re: Compressed Files where is button
    ... it refers to WinZip archive/zip ... Run the 2nd command also. ... Microsoft MVP [Windows XP Shell/User] ...
    (microsoft.public.windowsxp.general)