Short and sweet.
1) I dont suppose theres an easy way to copy a file from the network. Will "CopyFile" work?
2) How about from http and ftp?
Cheers all :U
RedXVII
If the location is mapped to a drive, yeah, you can use copyfile.
If it's not, you can map it yourself.
As for ftp, look at some APIs exported by wininet, the're quite useful.
Take a look at URLDownloadToFile (http://msdn.microsoft.com/workshop/networking/moniker/reference/functions/urldownloadtofile.asp) for grabbing a file off of the Internet. I have used it, and it works.
RedXVII,
Attached is a console app that uses URLDownloadToFile (http://msdn.microsoft.com/workshop/networking/moniker/reference/functions/urldownloadtofile.asp) as Greg suggested. This example was originally posted by Hutch, I think.
Paul
[attachment deleted by admin]
Thats a very very nice api.
Cheers guys! :U :U
RedXVII,
Were you referring to the Internet or LAN files?
CopyFile works for both standard DOS notation and UNC for copying files.
szSource db "\\MORK\AC_Temps\Install\AC_Temps.exe",0
Regards, P1 :8)
PS: We have servers named Moe, Larry, Curly, Shemp, Ricky, Lucy. Mork, but did not do Mindy, yet.
P1,
That's nice to know, about CopyFile working with UNC paths. :U
Paul