SOB ok I figured it out. I feel pretty stupid now.

This issue is with this line:

Code:
oSQL.GetFileName(strFileName, gvFiles.DataKeys(e.CommandArgument).Value())
returning an empty string, so instead of trying to delete a file, I was trying to delete a directory and that was failing.

Thanks for the help.