LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

unix-style filnames

I am using FTP VIs, for example "FTP Get Path Info.vi". I understand that the vi field "remote path" paths must have Unix-style format. I am trying to access files on the FTP site which contain spaces and am unable to do so. I am used to using quotation marks around the filname to access it. I have tried this and eveything else I can think of and the VI is not able to find the file. Everything works fine for filenames without spaces.

 

The file I am trying to access is in the FTP working directory so I only need to supply the filename string to "FTP Get Path Info.vi"

0 Kudos
Message 1 of 4
(2,863 Views)

Hi there

 

Have you tried to use the dstp - VIs for ftp transfer (sufficient for put and get)? i did a simple test with a file name containing spaces, and it worked.

 

if you use user authentification the URL has to be build like described here

 

http://digital.ni.com/public.nsf/websearch/bae38f5848be7c098625672400640233

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Download All
Message 2 of 4
(2,834 Views)

Chris,

Thanks for the prompt response. I have actually not been able to get the dstp VIs to work - I can run the code you attached with my ftp information - there is no error generated, but no data is read.

Before I continue getting the dstp communication to work I wanted to check if doing so would solve my problem. I need to get directory listings and file info (e.g. "date modified") from my ftp site. I don't see how this would be possible with the dstp approach. I have all the functionality I need with the FTP VIs - the only problem is accessing files with spaces in the name.

-john 

0 Kudos
Message 3 of 4
(2,812 Views)
I don't know if this applies to the FTP VIs, but when using web browsers the way to include control characters (ASCII chars <33) is to replace them with % followed by their value in hex, so a space (ASCII 32) would be %20. If this works, you can easily write a small piece of code to go over the path (be sure to check the folder names as well) and replace each ASCII character which is smaller than 33.

___________________
Try to take over the world!
Message 4 of 4
(2,810 Views)