Have you checked the permissions on the file? When it is accessed from the ASP application it will be accessed with the permissions of the account for the IIS Pool that's running the application (not the permissions of the user who is invoking the application from a browser). However, when you run it from the command line it uses your own user account, which may well have very different permissions on the file or its containing folder.
Long File Name problem for ASP script calling console application
I have developed a console application using C# for encrypting and decrypting a file and filename. It works properly in windows. However, when I call it from Classic ASP vbscript using WScript.Shell, it failed. The calling was with a very long file name such as "encodefile.exe -i ""c:\16T\Chinese[ED]Oc'3~6'=F^6C~BF8F^-A@)[ED]ka8QGVG9aYKK9CZXd8D[CLJ[~IANEW9NrF]JF=OklH@LVFJOmH]JDLGV~IDG7WGPoG]KKK9\[ED]ka8QGVH=SbYK=KJZNaNI[F6ON~HLCBWHQaA]HKGKkm9OJVEFQrYKKCEZZdKH\[2mRUJRN^qNPOCKI
lMQN73'.ec"" -decrypt" When I run the exact parameter in command line, it works properly, but when I run it in ASP script, it return error and the debug message shown "File Not found" when running File.Exists(filename); Any clue?