Calling SPIE from a batch file in .NET

May 5, 2008 at 10:43 PM
I made a batch file, that runs successfully and exports a folder to a network mapped drive. I then created a .Net website that runs this batch file via a web page, by feeding the single line from the batch file into cmd.exe.

The ASPX fires off and runs, but I get an error message from the command window. The text of that window is:
Microsoft Windows Version 5.2.3790
(C) Copyright 1985-2003 Microsoft Corp.

c:\spie\v3>spiefolder.exe http://sharepoint.myhines.com ESMExport h:\
Processing Folder /ESMExport
Could not find a part of the path 'h:\ESMExport'.

c:\spie\v3># c:\spie\v3\spie-esm.bat run successfully. Exiting

c:\spie\v3>EXIT

The bolded line is the problem. When I just double-click the batch file, it opens a cmd window, and the folder is exported properly. I am logged in as the same user that is in control of the app pool, and in Task Manager I see that cmd.exe is being run under the account "spsFarm" in both cases.
Also, if I change my bat file line:
spiefolder.exe http://sharepoint.myhines.com ESMExport h:\
to:
spiefolder.exe http://sharepoint.myhines.com ESMExport c:\
It DOES work...

Any ideas?