If any of your list that might appear to be in a corrupted state, when you try to delete it using SharePoint Web based UI you will get the below error message:
Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file.
Description: An unhandled exception occurred during the execution of the current web request. Review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Solution
using STSADM operation’s forcedeletelist, you can delete the corrupted list,
Example:
stsadm –o forcedeletelist –url