How do I modify the directory structure within Archive::Tar and mofiy its "path". For example I have a set of directories that reside in C:\users\temp\DIR1\DIR2\FILE.txt. I want to tar up \DIR1\DIR2\FILE.txt, and not C:\users\temp. How can I go about this? I am using the following code:
use Archive::Tar; $JOE = $ENV{"TEMP"}; my $tar = Archive::Tar->new; #I then define $city, $category and $page_number $tar->add_files("$JOE/$city/$category/$page_number", "$JOE/$city/$cate +gory/filedesc"); $tar->write('c:\files.tar');
When I then go and look in c:\files.tar, the entire temp path along with the directories I want are there. I have tried to rename them like so:
$tar->rename( "$JOE\$city\$category\$page_number", "/$city/$catego +ry/$page_number" ); $tar->rename( "$JOE/$city/$category/filedesc", "/filedesc" );
But that gives me all kinds of path errors. Can't I specify the "path" or the files within Archive::Tar?
Thank you.In reply to Archive::Tar and the paths within by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |