APS NZ
asked on
copying a file over the network
Hi
I have an ap which needs to copy files from a cd rom to a folder on my local hard drive. This works OK on my home PC, but at work on the network I get the error message "Directory does not exist".
I have done some experimenting to isolate the problem, and I have discovered that the error relates to a path with a space in the name - ie. w:\mar31_97\form files. When I leave the "form files" bit out of it there is no error message. Of course I tried formfi~1, but I still get the same error. I also tried to use a UNC path, but that failed too.
We are using NT SERVER 4, so it should be able to recognise long file names, shouldn't it? The copy routine I am using is from fmxutils.pas, and I am using D4 Standard.
Any help would be much appreciated
Regards
John
I have an ap which needs to copy files from a cd rom to a folder on my local hard drive. This works OK on my home PC, but at work on the network I get the error message "Directory does not exist".
I have done some experimenting to isolate the problem, and I have discovered that the error relates to a path with a space in the name - ie. w:\mar31_97\form files. When I leave the "form files" bit out of it there is no error message. Of course I tried formfi~1, but I still get the same error. I also tried to use a UNC path, but that failed too.
We are using NT SERVER 4, so it should be able to recognise long file names, shouldn't it? The copy routine I am using is from fmxutils.pas, and I am using D4 Standard.
Any help would be much appreciated
Regards
John
put the entire path between "
Like "w:\mar31_97\form files"
ASKER
Thanks for the reply Epsylon. I have tried it, but that will not work either.
John
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know those fmxutils, but with the standard CopyFile API you'll have no problems to do what you want to do (we're doing this all day).
Regards, Madshi.
Regards, Madshi.
fmxutils works GREAT with delphi 3
fmxutils and delphi 4. yecchh
been there... hated it.
the standard copyfile does seem to be the one to use.
fmxutils and delphi 4. yecchh
been there... hated it.
the standard copyfile does seem to be the one to use.
ASKER
Hi Jo, Madshi and Phoenix S - thanks for the replies.
I have tried Jo's code and it works, so I will accept that as an answer.
I have tried Jo's code and it works, so I will accept that as an answer.