發現一個目前是winrar 獨有的功能, delete files after archiving , 下的參數是 rar -df , 目前download winrar 4.11 是具備此功能的,其他如 7zip / winzip 目前都沒有發現對應的功能.
把它寫成一個VBS
strshell = "RAR.exe a -r -df d:\arc\demo-datetime.rar d:\datafolder\"
result1 = wshshell.run (strshell,0,False)
放到 WIN2k8做成排程
怪了..居然可以壓縮,但不能刪除舊檔..??
Why?
查了一下 Task Security Context ,是權限不足,勾選排程的"run with highest privileges", 即可正常執行.
2012年4月9日 星期一
2012年3月14日 星期三
Terminal Server 內的檔案為什麼不能刪檔案?
Windows 2008 ˉTerminal Server有時多人登入後,不知道為什麼偏偏有一個檔案不能刪,
點選刪除時,出現 Access is denied.
點選檔案右鍵=>[屬性Properties]=>[安全Security] =>[進階Advanced]=>
[Permissions]標籤 =>顯示 you do not have permission to view or edit this object's permission settings
[擁有者/Owner] 標籤=> [編輯/Edit] => [Change owner to] 挑選新Owner => [套用/Apply]
也無法變更。
明顯是某個執行中的程式正咬住,但又不知是誰?
安裝 Unlocker 1.19 後,http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
點選檔案右鍵=> unlocker =>即顯示Lock檔案的程式/程序ID(pid)/執行者等資訊.
請相應使用者退出後即可刪除.
點選刪除時,出現 Access is denied.
點選檔案右鍵=>[屬性Properties]=>[安全Security] =>[進階Advanced]=>
[Permissions]標籤 =>顯示 you do not have permission to view or edit this object's permission settings
[擁有者/Owner] 標籤=> [編輯/Edit] => [Change owner to] 挑選新Owner => [套用/Apply]
也無法變更。
明顯是某個執行中的程式正咬住,但又不知是誰?
安裝 Unlocker 1.19 後,http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
點選檔案右鍵=> unlocker =>即顯示Lock檔案的程式/程序ID(pid)/執行者等資訊.
請相應使用者退出後即可刪除.
訂閱:
文章 (Atom)