if(-e,-w "c:\\myfile.txt") { print"File exists"; }