Gadrin wrote: > 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 ?
Yes, you are doing something silly. :-) The -c option creates an archive. You are telling tar with 'tar -c -f Test.tar' to create a tar archive Test.tar. But you didn't give it any file arguments on the command line. And you are piping that into find which doesn't make sense to me either. The find comand will find files and take an action such as outputing the name or other things but doesn't make sense receiving whatever input was going to go into it there. You probably wanted to do something like this: tar -c -f Test.tar `find Top -type d` Except that requires a unix like command shell and your message showed you using the MS command.com and this won't work there. It would work in bash but not in command.com. You might be able to use bash for the command line like this. I have not tried it. bash -c "tar -c -f Test.tar `find Top -type d`" Bob