Forum Discussion

cap08's avatar
cap08
New Contributor III
2 months ago

Conversion from string to type integer is not valid

Hello,  I'm trying to delete a File Share file but getting the error in the Subject above and I don't know what's causing it - I'm hoping someone can help.  This is my code: Dim fileName As Str...
  • DanielWillis's avatar
    2 months ago

    I think you might be using DeleteFile wrong.

    I don't think it is expecting a string path in the 2nd parameter, it is expecting a FileSystemLocationType, e.g., FileSystemLocation.FileShare or FileSystemLocation.ApplicationDatabase. If there was a path I believe it would go into the fileFullName parameter.