用FileExists函数应该不会出错,在FileNameX变量中最好使用绝对路径。