//删除文件夹 RemoveDir; RemoveDirectory
var
dir: string;
begin
dir := 'c:\temp';
RemoveDir(dir); //返回 Boolean
//或者用系统 API:
RemoveDirectory(PChar(dir)); //返回 Boolean
end;
//获取当前文件夹 GetCurrentDir
var
dir: string;
begin
dir := GetCurrentDir;
ShowMessage(dir); //C:\Projects
end;
//设置当前文件夹 SetCurrentDir; ChDir; SetCurrentDirectory
var
dir: string;
begin
dir := 'c:\temp';
if SetCurrentDir(dir) then
ShowMessage(GetCurrentDir); //c:\temp
//或者
ChDir(dir); //无返回值
//也可以使用API:
SetCurrentDirectory(PChar(Dir)); //返回 Boolean
end;
上一页123
4567下一页