2
我想用python腳本刪除一些文件(使用Windows時)。我曾嘗試下面的代碼:使用python腳本刪除文件
>>>import os
>>> os.remove ('D:\new.docx')
,但我收到以下錯誤:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in -toplevel-
os.remove ('D:\new.docx')
OSError: [Errno 22] Invalid argument: 'D:\new.docx'
這裏任何人能幫助我嗎?
THanks。
吉拉尼
thanks .............! – Gillani 2009-09-16 11:26:47