2010-07-15 77 views

回答

1

因爲它似乎總是去,挖小時後我找到了答案張貼此之後...

rename ?_body.html ?.html 
rename ??_body.html ??.html 
rename ???_body.html ???.html 

照顧它。

1

你也可以用VBScript來做到這一點。下面是一個例子(基於this script):

Set objFSO = CreateObject("Scripting.FileSystemObject") 
strFolder = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") ''# Current directory 
Set objFolder = objFSO.GetFolder(strFolder) 
For Each strFiles In objFolder.Files 
    If objFSO.GetExtensionName(strFiles) = "html" Then 
     strComponents = Split(strFiles.Name, "_") 
     strFiles.Name = strComponents(0) + ".html" 
    End If 
Next 

保存上面它是運行目錄,然後雙擊運行它something.vbs。

+0

要格式化代碼,請將其縮進四個空格,或選中它並單擊編輯器工具欄上的代碼按鈕(101010)。 – Helen 2010-07-15 19:26:57

+0

非常酷,我想保存這個以備後用 – 2010-09-16 21:32:18