If you want to open dir "../Data/Sequencing_Results/Results 2009", it means you are jumping up one directory. You should substitute your dirs in the example I gave, and see what you get. Using relative pathnames can always be tricky, so if in doubt, use the full system path, then you don't need to worry about the dot's
#!/usr/bin/perl
use File::Spec
$filename= $0;
$abs_path = File::Spec->rel2abs($filename);
print "$abs_path\n";
$filename = File::Spec->abs2rel($abs_path);
print "$filename\n";
So in my example, say you were in a dir named 6, your topdir would be "../7" , as you suggest. But setup a test script that just does printouts with no copying, and see how your syntax works. Usually it's NOT a good idea to jump up dirs with .., so I would go with
full path names and that will solve your problem.
| [reply] [d/l] |
I agree about the relative pathnames and only used them for the example. I am using the full pathnames. I am currently setting up testdir1, testdir2 and cp actual data into them so that I can test the script.
| [reply] |