问一个关于路径的问题
......
if DirectoryExists('C:\shuju1\DATA\') then //判断文件夹是否存在
begin
Attr := faAnyFile; //文件属性值faAnyFile表示是所有文件
if FindFirst('C:\shuju1\DATA\*.txt',Attr,sr)=0 then
begin
repeat //如果有第一个就继续找
......
这个代码搜索txt具体内容。
我把这个文件放到C:\shuju1\DATA\下,正常执行,但是放到C:\shuju1\下或者其他目录,执行提示错误,请问这是为什么?
[解决办法]
XP系统是修改版的,路径可能错误
[解决办法]
请写出整个函数,并附加上报错(出错)是什么错误