// this does not work. File base = new File ( "mydir/myfile.txt" ); File f2 = new File( base, "myfile2.txt" );