Click here to Skip to main content
15,908,437 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
basically i need to make a function that will download a file ftom FTP, but to skip
re-downloading, I need somehow to make a check if the already downloaded file is the same as the one that needs to be downloaded, so I thought I will do it by checking the product version of all the files (all the files are .dll and they have product version), but i found new problem, to check the file product version, you need to download it first, which its no use for me, so i need to find another method of doing this, Any suggestion how can this be done? what is the fastest way?!

is there any direct access to the files on FTP?! or still you need to download them and then check information about them for example date stamp, product version and etc...
Posted

The only way I can see to achieve that, apart from an index file suggested in solution 1, would be to compare datetimes of modification. All other methods (hashing, file version, etc.) require the file to be downloaded.
 
Share this answer
 
Comments
SrgjanX 22-Mar-15 15:53pm    
do i have a direct access to "Date Modified" without downloading the actual file?
phil.o 22-Mar-15 16:38pm    
SrgjanX 22-Mar-15 16:42pm    
got it, i will try it right now, and see how it looks like and then i will rate your answer..
Have you the control of the source folder?

You could build an index file with all the information of each file in your source folder.

If not, Can you add the version to the file name?
 
Share this answer
 
Comments
SrgjanX 22-Mar-15 15:37pm    
yes i have full access to the ftp directory.
what kind of index file all the information?!
Joan Magnet 22-Mar-15 15:44pm    
for example a text or xml file with all the information you need. (versio, date, etc..)
You only need to download one file
You should rebuild this index every time you add a new file to the source folder
SrgjanX 22-Mar-15 15:49pm    
hmm no :/ i need other solution for this..
Joan Magnet 22-Mar-15 15:56pm    
If you have the control on the source folder you can do whatever you want. Add this info to the file name, you can rename it after downloading.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900