rbt <[EMAIL PROTECTED]> wrote: > >Can someone detail the differences between these two? On Windows which >is preferred?
os.unlink() calls unlink() in the C run-time library. In VC++, unlink() passes its parameter directly to DeleteFile. There is no difference. DeleteFile() is the only way to delete files on Windows. However, if you call os.unlink(), your script will ALSO work in Linux. win32api.DeleteFile() makes your script Windows-only. >Also, is it true that win32api.DeleteFile() can remove the 'special' >files located in the 'special' folders only accessible by the shell >object such as Temporary Internet Files, etc. "Temporary Internet Files" is a perfectly normal directory, living at "\Documents and Settings\username\Local Settings\Temporary Internet Files". It happens to be marked with the "system" attribute ('attrib +s'), but that doesn't make it special. Now, there certainly ARE special shell folders that do not exist in the file system. Control Panel and My Network Places are two examples. DeleteFile cannot touch those. You must use shell APIs. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list