GNU Tar on Windows XP

Gadrin <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <943e0705-d09f-4b16-a963-1c8663b58721@d21g2000prf.googlegroups.com>
I'm trying to see if I can use gnu tar to recreate an existing
directory structure, without all the files.

If I nav to a folder in Explorer and create a new folder called "TOP",
then go into TOP and create "MIDDLE" and
then go into MIDDLE and create "BOTTOM"; and leave them emtpy.

then I go back up to TOP and use

tar -c -f  MyDir-Stru.tar TOP/* it creates an archive just fine, no
grumbling

J:\Temp Folders\wbtTemp>tar -c -f MyDir-Stru.tar Top/*

J:\Temp Folders\wbtTemp>dir *.tar
 Volume in drive J is Big Hard Drive
 Volume Serial Number is C04F-2C92

 Directory of J:\Temp Folders\wbtTemp

03/01/2008  04:45 PM            10,240 MyDir-Stru.tar
               1 File(s)         10,240 bytes
               0 Dir(s)  142,089,994,240 bytes free

J:\Temp Folders\wbtTemp>tar -t -v -f MyDir-Stru.tar
drwsrwsrwx user/group        0 2008-03-01 15:41 Top/Middle/
drwsrwsrwx user/group        0 2008-03-01 15:41 Top/Middle/Bottom/

I can now use -x and recreate the folder structure !!! Nice !!!

*** However ***

if I use

J:\Temp Folders\wbtTemp>tar -c -f Test.tar | find Top ! -type f
tar: Cowardly refusing to create an empty archive
Try `tar --help' for more information.
Top
Top\Middle
Top\Middle\Bottom

tar gives up and won't create the archive. Am I doing something
wrong ? Just not possible ?

I'm using...

J:\Temp Folders\wbtTemp>tar --version
tar (GNU tar) 1.12

is there a newer Windows binary out there ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.