07-27-2016 07:30 PM
Hi,
I am writing an application in LabVIEW where I have to access files on the ftp server. I have added the ftp folder under "Computer" using Add a network location. Now the ftp folder shows under the computer and I can access it like a local folder in windows explorer.
However, if I try to select a file in the ftp folder from LabVIEW, it doesn't let me do that. In the path control I can browse to the file location in the ftp folder but when I hit OK after selecting the file, the file dialog doesn't close.
Is it possible to access file in the ftp folder from LabVIEW?
Thanks,
Ritesh
Solved! Go to Solution.
07-27-2016 07:58 PM
I'm reasonably sure that Windows built the appropriate "wrappers" around the FTP Protocol to allow a "drag-and-drop" and Network Place "folder". If you want to do an FTP transfer, there is a series of FTP functions (look in Data Communications under Protocols, FTP). You'll need to do some of the low-level stuff yourself (Windows "does it for you", but LabVIEW "allows" you to do it for yourself).
Bob Schor
07-28-2016 12:47 PM
My problem isn't about sending or retrieving files FTP. It is about selecting the file in the windows explorer itself and I don't think there is any straightforward solution in LabVIEW. So basically what I have to do is write windows explorer for FTP inside my application.
07-29-2016 09:23 AM
Well, I can do most of this, the only thing I haven't figured out is how to get the IP address of the FTP Server I want. Note that this returns a top-level Directory listing -- if you need directories of folders, you need to write additional code. On my machine, my LabVIEW Real-Time PXI has an FTP Server that shows up in my File Explorer Window -- I can't use its name here, but I can get its directory by its IP, 10.0.1.103.
Bob Schor
08-03-2016 12:06 PM
Bob,
I researched a little bit to see if there was a direct way to access the files on the ftp server using labview windows explorer but I couldn't find any. So I wrote my own FTP explorer. It was easy to implement as the the ftp ip and port is already known to me.
Thanks,
Ritesh