I have an requirement to automate some acction whereby I require to move files (auto-generated) from 1 given directory to some directory. I designed an application and used 'FileCopy' to move files from one directory to another (both local and network drive) and was working fine.
This utility was running on server and being an application if anybody logout from the server the application gets terminated.
To avoid this sceniro I planned to convert it as a NT service. I converted it as a service and it is working fine with local drives, moving to network drives/mapped driveshave stopped working.
Isn't this because when you are not logged in, you have no mapping? Did you try UNC instead of mapped drive?
\\myserver\myfolder instead of R:
also check how is the service started.... LOG ON as .... if you are not logged in, you cannot access network drive... try to use admin name and password for that service (control panel - services under your service pick tab LOG ON)
I'm doing the same thing, I have a Windows Service and using UNC working, now my next issue is an UNC that needs a different domain/Userid and password. insort-copy a file from 1 server with one user id/password to another server with different user ID/password. Admin from 2 sites don't want to use common IDs. Any ideas or key words to look up would be cool!