fP accessing a UNC named server

Robert Haussmann haussma at nextdimension.net
Fri Sep 2 12:04:28 PDT 2005


> fP v5.0.13, Windows 2000 Advanced Server, & WIN2000 & WINXP clients.
> 
> I have need from *report using @DONE processing to export and 
> transfer a 
> small data file from several client machines to an FTP server 
> on their 
> local network.  The network administrator on site would 
> prefer this be 
> done using the UNC designation of that FTP server and not have the 
> clients each mapped to the FTP server.  Can this be done from within 
> fP?  Ex:
> 
> COPY C:\TESTFILE \\FTPSERVER\FTP\DESTINATION
>

This method works just fine, assuming you have create/write rights
to the UNC share.

Note that you might want to use "copy /y" to force an overwrite
in case the file exists at the destination (if applicable).  
Otherwise, your process will stop and wait for the user to press 
Y/N to overwrite.

> Second question, if the above is not possible, from a command 
> line I can:
> NET USE M: \\FTPSERVER\FTP
> COPY TESTFILE M:\DESTINATION
> This works as expected.
> 
> However, if I do this from fP using system calls I get no error 
> message(s) but do not get the drive mapped and hence the file is not 
> copied (still w/o error messages).  Ex:
> AA(40,*)="NET USE M: \\FTPSERVER\FTP"
> AB(40,*)="COPY C:\TESTFILE M:\DESTINATION"
> SYSTEM AA
> SYSTEM AB;END
> 
> Also, if I add the NET USE command to my startup batch file I also do 
> not get any error messages and the drive is not mapped.  Why is this?
> 

This may or may not work.  The first time it runs, if M: is unmapped
and not a local drive (CD or other removable media for example), it
should map.  The second time, you might get an error about the drive
already being mapped.

Not sure why having the net use command in the startup batch file
doesn't work.  Possibilities include:

1) "ftpserver" cannot be resolved (e.g., you should be able to do
"ping ftpserver" and get a response at the client)
2) m: is a local drive letter
3) user doesn't have rights to the share

Bob Haussmann
Tabor Children's Services, Inc.



More information about the Filepro-list mailing list