浅谈【windows.h】(4)
Dimly_dust · · 个人记录
上期回顾:
- 浅谈【windows.h】(1)
-
FindWindow 函数
-
SendMessage 函数
-
WindowFromPoint 函数
- 浅谈【windows.h】(2)
-
GetCursorPos 函数
-
SetCursorPos 函数
-
ShowWindow 函数
- 浅谈【windows.h】(3)
-
GetClientRect 函数
-
GetCWindowRect 函数
-
Sleep 函数
此篇讲述关于文件的操作。
- CopyFile
- 功能:CopyFile函数可以用来复制文件到指定目录。
函数原型:CopyFile("文件源目录","文件目标目录",TRUE or FALSE);
void Copy(char File1[1024],char File2[1024])
{
CopyFile(File1,File2,FALSE);
}
- DeleteFile
- 功能:删除指定文件
函数原型:DeleteFile("要删除的文件路径和文件名");
void Delet(char Dele[1024])
{
DeleteFile(Dele);
}
- CreateDirectory
- 功能:创建一个目录(注意:一次只能创建一级路径,而不能创建多级路径)
函数原型:CreateDirectory("文件夹路径名",NULL);
void Delets(char file[1024])
{
DeleteFile(file,NULL);
}
- RemoveDirectory
- 功能:删除指定目录(注意:只能删除空目录)
函数原型:RemoveDirectory("目录路径名");
void Remove(char file[1024])
{
RemoveDirectory(file);
}
上一篇