06-20-2011 04:26 AM
hello all
i'm working on two challenges where i couldn't find any more details in the forum here.
1. to copy a directory from a server via ftp, there is no own vi for or? means that files in the directory has to been copy with 'FTP Retrieve Multiple' for example, create a local folder and put them in there, right?
2. to find out when the whole process is finished, what possibilities are there? the status out isn't usable for this as i see it. i tried to use the 'get file size' vi of the local while copying it and to compare it with the original file. unfortunately, the local file seems to be created at the end of the process and so it couldn't be parsed while...
thanks for any hint. perhaps i made also some wrong thoughts about it...
06-20-2011
05:01 AM
- last edited on
03-22-2024
09:37 AM
by
Content Cleaner
Hi,
The Internet Toolkit provides FTP functions to get and put files, read contents, directories and there are also VI's for the status of the FTP transaction.
Christian
06-20-2011 09:25 AM
hi christian
thanks for your answer.
i've still installed the internet toolkit with the ftp vi's as well as the intermediate ftp vi's.
but my two questions stays still open. could you describe me the solutions a bit more in detail please?
1. what is the (simplest) way to copy a whole directory?
2. how to control the remaining time of a file transfer?
thanks a lot in advance
06-20-2011 10:16 AM
@mischl wrote:
1. what is the (simplest) way to copy a whole directory?
2. how to control the remaining time of a file transfer?
I think there's no simple solution to both of your requests when using the NI Internet toolkit FTP functions.
1. The simplest might be a recursive approach: for a directory, create local directory, list remote directory contents, copy files into corresponding local directory. For directories, call the VI recursively.
2. There's no direct way. The FTP VIs are open, so you can dig into the FTP Data Receive.vi > TCP Read Stream.vi. There the data is read from the TCP connection in chunks of 4096 bytes. So there you have the information. But I wouldn't recommend changing the toolkit VIs, this creates non-portable code. If you want to modify the VIs, create a copy of the modified VIs in your project.