Copy from FTP(12.50.100.21) to FTP(12.45.222.25)

patrick

Well-known member
Joined
Dec 5, 2021
Messages
305
Programming Experience
1-3
Hello


It is definitely From FTP To FTP.

Copy from FTP(12.50.100.21) to FTP(12.45.222.25)

I need sample code.

Please give me a site with sample code for Copy from FTP(12.50.100.21) to FTP(12.45.222.25)

Please Help me
 
In other words, gimme-the-codez.
 
We are not here to do your (home)work for you. There are sites like chegg and others where you can get others to do your work for you.

Or you could just have ChatGPT or CoPilot write the code for you.
 
We are not here to do your (home)work for you. There are sites like chegg and others where you can get others to do your work for you.

Or you could just have ChatGPT or CoPilot write the code for you.

sorry. I will not ask for sample code
in the future.

I'm an idiot. I need your help.
I need help with this site.

Please...
 
Telling us you're an idiot doesn't mean that we'll do your work for you. I doubt that you are an idiot, to be frank. I would suggest that you're just lazy, which is a far more common scenario. If you want to use FTP in C#, do some research on how to use FTP in C#. There is plenty of information and examples already out there. If you haven't taken the time and made the effort to look for them, read them, understand them and use them then you are literally asking us to do your work for you. If you make that effort and you encounter something you don't understand then you can ask us about that specifically and we'll be glad to help. If you think you know what to and you try it but it doesn't work, you can show us what you did and tell us what happened and we'll be glad to help. If you're trying then we'll be happy to help you along. If you won't make an effort on your own behalf, it feels to us like you're taking advantage.

On the subject of FTP, there is no copying. You have to download the data from one site, then upload it to the other. It will be two separate operations so you can research and implement them separately, then merge the two.
 
Telling us you're an idiot doesn't mean that we'll do your work for you. I doubt that you are an idiot, to be frank. I would suggest that you're just lazy, which is a far more common scenario. If you want to use FTP in C#, do some research on how to use FTP in C#. There is plenty of information and examples already out there. If you haven't taken the time and made the effort to look for them, read them, understand them and use them then you are literally asking us to do your work for you. If you make that effort and you encounter something you don't understand then you can ask us about that specifically and we'll be glad to help. If you think you know what to and you try it but it doesn't work, you can show us what you did and tell us what happened and we'll be glad to help. If you're trying then we'll be happy to help you along. If you won't make an effort on your own behalf, it feels to us like you're taking advantage.

On the subject of FTP, there is no copying. You have to download the data from one site, then upload it to the other. It will be two separate operations so you can research and implement them separately, then merge the two.

Your Answer)
You have to download the data from one site, then upload it to the other. It will be two separate operations so you can research and implement them separately, then merge the two.

My Question)
1) Do you need to upload after downloading?
I am uploading File of FTP(12.50.100.21) to FTP(12.45.222.25).

2) Which path should I temporarily download?
 
Do you need to upload after downloading?

Do you think that uploading before downloading would be an option? Do you think that you can put groceries in your cupboard before buying them from the supermarket? Please put some thought into the problem. The same logic that you have used your whole life up to this point does not suddenly go out the window because you're writing application code. Of course you have get something first before you can put it somewhere else.
 
I am uploading File of FTP(12.50.100.21) to FTP(12.45.222.25).

Please read the words this time. The download and the upload are two separate operation. You're downloading a file from an FTP site to your local machine. You are then uploading a file from your local machine to another FTP site. They are separate operations so treat them that way. Go and do some research on how to download a file from an FTP site. Don't even think about the upload until you can do that.
 
Which path should I temporarily download?

If you're asking where you should save the file you download then that's completely up to you, but it should be somewhere sensible. The current user's temp folder would make sense, but there are other options.
 
If you're asking where you should save the file you download then that's completely up to you, but it should be somewhere sensible. The current user's temp folder would make sense, but there are other options.

Your Answer)
The current user's temp folder would make sense, but there are other options.

My Question)

1> there are other options.
<== What method is this?

2> If I use libcurl, can I upload File of FTP(12.50.100.21) to FTP(12.45.222.25)?


I am eagerly awaiting your answer.
 
Last edited:
1> there are other options.
<== What method is this?

You are asking a question that is in the weeds when you should be asking a question that is at the 10,000 ft view. There are many possible places to temporarily store the downloaded file. You could be asking where those other places are, but instead you are asking for how to get the places.

The question you really should be asking is how do I download a file via FTP. Where the file ends up will be a minor detail, which won't significantly affect how you write the download code. The location will eventually just be a string that you can change. On the other hand, the download code could be potentially be much tougher question depending on whether you use the built in classes, use a library, or roll your own code to talk to FTP directly using network sockets.

If you do a simple Google search for "C# FTP download programmatically", there are many hits, with most of them with code.
 
2> If I use libcurl, can I upload File of FTP(12.50.100.21) to FTP(12.45.222.25)?

As previously mentioned, no, not in a single step. Even using libcurl, you will still need to download the file, and then upload it.

I would not recommend using libcurl, because now you would also have to go through the learning curve of how to link in and call C code from C# code. Instead I would recommend that you use the FTP functionality that is has been built into the .NET Framework since version 2.0. Or was it 1.1? It's been around that long.
 
Back
Top Bottom