Click here to Skip to main content
15,916,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
hi everyone how can i check my files corruptin or no  after uploading my files to ftp server


What I have tried:

I have a try to find in google but i cannot find anything
Posted
Updated 12-Jul-16 2:46am
Comments
Suvendu Shekhar Giri 12-Jul-16 8:35am    
What kind of corruption are you expecting on these files?
Sake562 12-Jul-16 8:42am    
loss of information or not loaded all of information
Suvendu Shekhar Giri 12-Jul-16 8:44am    
then probably you can compare the size of both the files in bytes and see if all the bytes are transfered or not.

1 solution

well ....

lets say 'n' files are in a batch of work
As you are sending the files, add their name, filesize, and SHA1 hash to an 'index file'
Send the 'index file' via FTP

Periodically or on receipt on an index file, a process on the FTP server side inspects the index file
for each file in the index, it checks the filename, filesize, SHA1 # of the received ie local ftp'd file, generating an error report if there is a mismatch

it obviously depends on what type of corruption you're expecting, and if you're not sending the files in binary/image mode, then you may have issues, and you have to think what you're going to do with the 'corruption report'
 
Share this answer
 
v2
Comments
Sake562 12-Jul-16 8:55am    
According to the saying FTp server so dangerous server , due to i have to take into consideration everything before writing code.Loss of information can happen when i load information to ftp server and i am not aware of this situation.Due to i have a try to prevent of this situation
Garth J Lancaster 12-Jul-16 9:16am    
well, if its that critical, you would also want to consider

moving from ftp to sftp/ftps
strong encryption of the files
full auditing

paying money for a decent implementation that allows you to do all of those tasks

you havnt said what your business is, obviously it gets more interesting if you have 'compliance' issues - eg PCIDSS, HIPAA ....

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