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