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

Durectory is getting created...But the problem is that the file is not getting created inside the directory
  • Comment on Re^4: Creating result file with time stamp

Replies are listed 'Best First'.
Re^5: Creating result file with time stamp
by apl (Monsignor) on Jun 17, 2009 at 12:40 UTC
    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.