problem fixed. here was the problem:
the SOURCE filename had the path AND filename
the DESTINATION had only the PATH. needed the filename too.
When you try to write using the textwriter to a FOLDER (as opposed to a
file) you get "The given path's format is not supported". but I guess in this
exact same problem, but with File.Move, you get "Access is denied". I think
that's a rather misleading error. add to that that the intellisense says for
the destination parameter "The New Path of the file" rather than "The new
path and name of the file" and you can see how such a minute error could
happen.
but whatever. it's fixed!
"roger_27" wrote:
but that's the thing, I am a network administrator, and that folder has
permissions for administrators to have full control
"Michael D. Ober" wrote:
"roger_27" <ro*****@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
hey, I've seen this problem many times over the net, and now I'm one of
them.
simple code really.
>
File.Move(RemoteFolder, MoveImportedFilesTo);
>
where
RemoteFolder = \\192.168.1.99\ftp2users\monday\original1.csv
and
MoveImportedFilesTo = C:\wow.csv
>
all I get is "Access to the path is denied." . I dont get it. I'm not only
a
local, but a network admin, and I specifically gave my user FULL CONTROL
over
the directory.
>
I'm doing this in a windows service.
>
any ideas what else I could be missing here?
>
The key is that you're doing the file move in a service. By default,
Windows runs services under the LocalSystem account, which doesn't have
network access. You need to change the service account to an account that
has network access.
Mike Ober.