本帖最后由 linmi 于 2011-2-15 07:26 编辑 $art_files_path = IniRead(@UserProfileDir & "\setting.ini", "location", "path", "NotFound")
$art_temp_path = IniRead(@UserProfileDir & "\setting.ini", "location", "path", "NotFound") & "\temp" & @MDAY
if FileExists($art_temp_path) Then
DirRemove($art_temp_path,1)
DirCreate($art_temp_path)
Else
DirCreate($art_temp_path)
EndIf
$message = "按 Ctrl or Shift 键 可多选 ."
$select_art_files = FileOpenDialog($message, IniRead(@UserProfileDir & "\setting.ini", "location", "path", "NotFound") & "", "Art文件 (*.art)", 1 + 4 )
If @error Then
MsgBox(4096,"","无文件")
;-----------------------------------------------------------------------------------
Else
$files = StringSplit($select_art_files,"|")
If $files[0] > 1 Then
For $k = 2 To $files[0]
$art_full_path = $files[1] & "" & $files[$k] ;源文件的真实路径
FileCopy($art_full_path,$art_temp_path) ;拷贝文件至临时目录
FileSetAttrib ($art_temp_path & "" & $files[$k] , "-R") ;去除ART文件的只读属性
$file_name = $art_temp_path & "" & $files[$k]
$software_sed = @UserProfileDir & "\tools\sed.exe"
;取消空行
RunWait(@ComSpec & " /c " & '"' & $software_sed & '"' & " -e ""/^ *$/d"" " & $file_name & " > " & $art_temp_path & "\art_temp.rtf","",@SW_HIDE)
Next
EndIf
EndIf
RunWait(@ComSpec & " /c " & '"' & $software_sed & '"' & " -e ""/^ *$/d"" " & $file_name & " > " & $art_temp_path & "\art_temp.rtf","",@SW_HIDE) <----- 在@userprofiledir目录下执行sed.exe,则无任何反应。将sed.exe放至路径中不带空格的目录中则正常。我也尝试用“”将路径括起来,但均无反应。请各位高手帮我指正一下上面的程序到底是哪里出错了。 谢谢! |