in reply to Re^2: Creating result file with time stamp
in thread Creating result file with time stamp

That means the directory 'results' doesn't exist

Other problem

`mkdir ./results/$resultfile`; $path="./results/$resultfile";
"/results/$resultfile" can't be both a directory and a file.
$ md temp $ echo >temp Access is denied.

Replies are listed 'Best First'.
Re^4: Creating result file with time stamp
by Anonymous Monk on Jun 17, 2009 at 06:38 UTC
    Durectory is getting created...But the problem is that the file is not getting created inside the directory
      mkdir creates a directory, not a file. It's trying to create a subdirectory (what you intended to be a file) under a directory that doesn't yet exist. It then creates that parent directory, your original intention. Create the file as a seperate step after creating the directory.
Re^4: Creating result file with time stamp
by Anonymous Monk on Jun 17, 2009 at 06:41 UTC
    Directory is getting created...But the problem is that the file is not getting created inside the directory
      No.
      D:\tmp>mkdir 1 D:\tmp>mkdir 1 A subdirectory or file 1 already exists. D:\tmp>echo >1 Access is denied. D:\tmp>echo > 1\2\3 The system cannot find the path specified. D:\tmp>perl -Mautodie -e"open F, '>', '1/2/3'" Can't open '1/2/3' for writing: 'No such file or directory' at -e line + 1 D:\tmp>perl -Mautodie -e"open F, '>', '1'" Can't open '1' for writing: 'Permission denied' at -e line 1
      Which directory is getting created? "results" or the sub-directory that is named according to the date (eg "test-result-2009-06-17")?

      --
      use JAPH;
      print JAPH::asString();