移动设备文件复制器

易语言 2020-10-10 11:38:13

移动设备文件复制器

Path = 指针到文本 (参数)
.如果真 (取文本长度 (Path) = 1)
Path = Path + “:”
.如果真结束
Path = 选择 (取文本右边 (Path, 1) = “\”, Path, Path + “\”)
hFile = FindFirstFile (Path + “*.*”, FileData)
.如果真 (hFile ≠ #INVALID_HANDLE_VALUE)
Cont = 1
FileName = 到文本 (FileData.cFileName)
.判断循环首 (Cont ≠ 0)
.如果真 (FileName ≠ “.” 且 FileName ≠ “..”)
FileName = Path + FileName
.如果真 (PathIsDirectory (FileName))
创建目录 (“D:\U盘复制\” + 取文本右边 (FileName, 取文本长度 (FileName) - 2))
Q_Disk = FileName
文件列表 (GetTextAddress (Q_Disk))
Cont = FindNextFile (hFile, FileData)
FileName = 到文本 (FileData.cFileName)
到循环尾 ()
.如果真结束
CopyFile (FileName)
.如果真结束
Cont = FindNextFile (hFile, FileData)
FileName = 到文本 (FileData.cFileName)
.判断循环尾 ()
.如果真结束
FindClose (hFile)