根据需要自己改Local $Dir = @ScriptDir & '\'
Local $search = FileFindFirstFile($Dir & '*.dat')
If $search = -1 Then Exit Msgbox(16,'错误','未找到DAT文件,请检查文件名和路径')
Local $File, $DataDir, $zipName
While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
$zipName = StringRegExpReplace($file, '(?i)(.+?\.)dat$', '$1') & 'zip'
$DataDir = $Dir & 'Data\' & StringRegExpReplace($file, '.*_(\d+).*', '$1')
;Msgbox(0, $zipName, $DataDir)
FileMove($file, $zipName, 1)
RunWait(@TempDir & '\7z.exe e -pxsbbak123 ' & $zipName & ' -o' & $DataDir, '', 0)
WEnd
|