Dear all, It was solved. It was because when I created the file using windows explorer "New Text Document" typed "deleteme.txt" as name, so actually the filename was "deleteme.txt.txt".
Regards, --- Mico | [email protected] | @bangmico -----Original Message----- From: "Mico Siahaan" <[email protected]> Sender: [email protected] Date: Mon, 27 Dec 2010 02:26:57 To: <[email protected]> Reply-To: [email protected] Subject: Re: [python-win32] Using ctypes Dear Shun-ichi, I did replace "E:\deleteme.txt" to r"E:\deleteme.txt" or to "E:\\deleteme.txt" but still failed. Thanks, --- Mico | [email protected] | @bangmico -----Original Message----- From: Shun-ichi Goto <[email protected]> Sender: [email protected] Date: Mon, 27 Dec 2010 10:51:13 To: <[email protected]> Subject: Re: [python-win32] Using ctypes 2010/12/27 Mico Siahaan <[email protected]>: > import ctypes > ctypes.windll.kernel32.DeleteFileA("E:\deleteme.txt") It should be r"E:\deleteme.txt" or "E:\\deleteme.txt" -- Shun-ichi GOTO _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
