Click here to Skip to main content
15,892,927 members
Everything / FTP

FTP

FTP

Great Reads

by deangi
DIY GPS Location Tracker
by Sergio Andrés Gutiérrez Rojas
Easy FTP Upload without files size limit
by Member 12032084
.dll for making the FTP management with VB.NET easier
by DiponRoy
Using SFTP/FTP in ASP.NET CORE projects

Latest Articles

by deangi
IoT data edge hub is designed for remote low power unattended applications. IoT devices can post data to the Hub which will store the data and make it available for later download to core servers. Design is based on a low cost ESP32 platform with an attached SD card.
by deangi
Monitoring AC loads with CT sensors
by deangi
DIY GPS Location Tracker
by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker

All Articles

Sort by Updated

FTP 

10 Feb 2024 by deangi
IoT data edge hub is designed for remote low power unattended applications. IoT devices can post data to the Hub which will store the data and make it available for later download to core servers. Design is based on a low cost ESP32 platform with an attached SD card.
28 Jan 2024 by deangi
Monitoring AC loads with CT sensors
21 Nov 2023 by deangi
DIY GPS Location Tracker
16 Nov 2023 by Andre Oosthuizen
Quote: 1) Where should I put the file that I want users to be able to download? You should store downloadable files in a directory that is not directly accessible from the web. In a 'Blazor' app, you should normally create the folder named...
15 Nov 2023 by Member 9581093
I am new to website programming and I am confused by the different option I have read on this topic. So, I would like to just ask the question very simplistically and make sure I am approaching this correctly. Task I am hosting a Blazor web...
26 Mar 2023 by Member 10949531
When i use this code click on asp.Button then all operation correct but file not download. Please help me What I have tried: FtpWebRequest request1 = null; request1 = (FtpWebRequest)WebRequest.Create(ftpServerIP + Session["appid"] + "/" + fname); //Enter FTP Server...
26 Mar 2023 by Member 15962593
private void Download(string file) { string FromLocalFile = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["FromLocalFile"].ToString()); string ToServerFile =...
26 Mar 2023 by chimcham
So I have this ftp upload, upload file from my local to ftp folder, but my problem is, I need to refresh the FTP Folder to view my uploaded file. Pls help. What I have tried: using System.Net; using System.IO; //Create FTP request FtpWebRequest request =...
26 Mar 2023 by Member 15962586
public static void Upload(string f) { string ftpserverIP = System.Configuration.ConfigurationManager.AppSettings["ftpserverIP"]; string username = System.Configuration.ConfigurationManager.AppSettings["username"]; ...
20 Mar 2023 by Luigi Sansone
Hi guys, i'm a newbie tryn to develop a WEB App in Node JS. What i'm doing is downloading a PDF file from a FTP server and merging it(using PDF Merger plugin) with an other one coming from the Front End User. Here is the part of my code throwing...
17 Jul 2022 by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker
10 Jun 2022 by Emilia Kullutwe
I am using WinSCP to connect to my ftp server. I get files from ftp server and saved them in a local folder on my pc. I have a batch script that I run manually everyday. This script synchronizes the files in the ftp server with those in my local...
10 Jun 2022 by OriginalGriff
You can't. The key bit here is "How can I run a batch file when the pc is off" When a PC is powered down, the processor is not running, and no applications, scriopts, or batch files can execute on it. If it's hibernated, or sleeping then it's...
26 May 2022 by Haifovchanin
I'm trying to upload a file to FTP server using SSL certificate, but receives WebException with the following message: 'The remote server returned an error: (501) Syntax error in parameters or arguments. The code I'm using to send a file is the...
26 May 2022 by CHill60
Quote: If you set UsePassive to false, then you need to make sure that the port for the command channel is open (i.e., you need to define endpoints and access rules). Unless there is a good reason to not use passive, you are far better off using...
6 May 2022 by Mphirana
I have the below WinSCP script that downloads Payment/transaction files from the FTP. It gets the files with Transaction word from Benchmark "Uber" and copy it to Downloads folder then moves the file to Archive folder. I want to create a log...
6 May 2022 by matblue25
See: https://winscp.net/eng/docs/logging_xml. Note that it says, “The XML logging, being used along with scripting, is most typically enabled from command-line, using /xmllog parameter. It can be enabled in preferences too.”
31 Dec 2021 by Member 11656878
I am trying to auto sync my remote database with my local machine by using php file_get_contents and connecting to remote server with ftp_connect frequent intervals. I am using windows Task Scheduler from my local machine for that. My php...
14 Jun 2021 by Patrick Skelton
It seems the answer to this is extremely simple. Publish to a local folder on your machine and then use FTP to put the contents of this folder on the web server. I have an excellent program called SyncBackSE which will watch a directory for...
14 Jun 2021 by Patrick Skelton
I have newly created an MVC.NET application using the template in Visual Studio 2019. This runs fine in my local IIS (built into VS) but when I deploy to my live server, I get a couple of 500 errors. The offending files are an image that I have...
14 Apr 2021 by OriginalGriff
You can't. FTP is not a file system, but a protocol to transfer data, and it doesn't allow directly access to files. FTP is not made for this scenario, and will not work.
14 Apr 2021 by Paramu1973
Hi, I wish to have a connection string for my ftp server with Static IP, Any Sample Query will be helpful. My Codes:- MyConnectionString=" Provider=Microsoft.ace.Oledb.12.0; Data...
9 Feb 2021 by Commish13
Hello,I'm having trouble ftp(ing) uploading a text file to the correct location I can view the locations via FileZilla. I wrote a test script that runs a method called 'UploadToFTPSite' this is the TEST SCRIPT code:public void UploadToFTPSiteSuccess(){ //Arrange var ibxMedOut...
9 Feb 2021 by vaibhavgla
Try to add "/" before subfolder name.
1 Feb 2021 by Reden Rodriguez
Hi Guys, as you can see my question I'm trying to use powershell using c# winform to send an ftp, this my be a bit odd because there is a much simple way, i did this because i can't connect in my client but when i'm using a powershell i can...
27 Jan 2021 by Member 15058393
Check disk space on the remote server first. I had the same issue and found out it was because the remote server i was attempting to upload files to had run out of disk space on the partition or filessytem.
27 Jan 2021 by Sebastian T Xavier
HiI was trying to upload file using ftp.(To a Linux machine). The following is the code, which I have tried. try { string filename = @"C:\Users\Admin\AppData\Local\Temp\Roaming.Doc"; String ftpServerIP = "ftp://192.168.1.246:21/"; ...
14 Dec 2020 by Member 11382409
I have web service and a web method that has System.IO.Stream return type. [WebMethod] public System.IO.Stream GetDYFtpWebRequestStream(string firmName, string filePath) { string ftpAdress = ftpServer + ":" + ftpPort + "/" + ftpFolder + "/" +...
14 Dec 2020 by Richard Deeming
You cannot return a stream from a web method - not even a read-only stream, let alone a writeable stream. You will need to read the file contents in the client and pass it in to the web method. [WebMethod] public void UploadFileToFtp(string...
29 Oct 2020 by Member 14979165
Could You please share the source code and documentation with or the github repository at heartdarked@gmail.com It would be great help of you. Thank You in advance.
29 Oct 2020 by Member 12791977
I need a starting point to my Android project, for me this will be a big help. because my idea is based on transferring files between android devices.What I have tried:Searched a lot! but didin't get an answer
20 Jul 2020 by DiponRoy
Using SFTP/FTP in ASP.NET projects
13 Jul 2020 by DiponRoy
Using SFTP/FTP in ASP.NET CORE projects
9 Jul 2020 by AndyUK62
Hi there I have an issue I would love some help with please. I am writing an app which sends a database held on the PC to a server. The app is written in VB.net and the server uses Filezilla. There are approx. 380 files to transfer, mostly all...
9 Jul 2020 by MadMyche
This may be by design at the server; hosts can and do place limits or throttle the services. DESTINATION LIMITS One major consideration is the maximum number of connections your destination will allow. Many (nearly all?) sizable FTP sites will...
8 Jul 2020 by Garth J Lancaster
I always thought (maybe incorrectly but anecdotally) FTP was a 'network greedy' protocol - and at some stage your going to hit max traffic with small files. I wonder if it would be better if you sent larger aggregations of files - re-zip into...
24 Apr 2020 by MadMyche
This is not a programming question; what you are asking is all about configuring services that already are on your computer, or you want to install. Here is a tutorial on setting up FTP on Windows 10: How to set up an FTP server in Windows 10[^]
16 Feb 2020 by cHl Security
It showed nothing. Id appreciate any form of diret assitance from you.
16 Feb 2020 by cHl Security
I am trying to make a vbscript to upload files to remote ftp directory, after running the script and I check the directory, I discovered that the expected file didn't upload. I have been working arounf this for some hours now and I am unbale to...
15 Feb 2020 by Patrice T
Quote: It didn't give a prescribe error from any line. First picture says Line 7 and running the code with debugger would have go strait to the error. From your code, it is: Set oShell = CreateObject("Shell.Application") Quote: Your code do...
15 Feb 2020 by MadMyche
Not an answer to your problem, but something to help you find out what the actual problem is. Your code has the wonderful line On Error Resume Next which suppresses the script from stopping at the point of failure; and allows you to do error...
8 Dec 2019 by byQuince
using (Ftp client = new Ftp()) { client.ServerCertificateValidate += ValidateCertificate; client.ConnectSSL(Host); client.Login(Username, Password); client.Upload(filename, LocalDestinationFilename); } ...
5 Dec 2019 by byQuince
I am not having errors with the FileZilla server. I'm just getting an error in c #. When I run C # on another computer, it still works properly. The application is updating to ftp on computer A. But B is giving error on computer
19 Jul 2019 by Member 12899279
string nn = comboBox1.Text.ToString(); string name2; if (nn.Contains("#")) { name2= nn.Replace("#", "%23"); } else { name2=nn; } got this as a temporary fix.
19 Jul 2019 by Member 12899279
the remote server returned an error(550 file unavailable). as far as i am aware of # can be used in naming files then why do i get error to access files and folders that have # in their name? get error here on getrequeststream(); What I have tried: FtpWebRequest request =...
19 Jul 2019 by MadMyche
The most likely reason is that while the # may be valid in a filename, it is used as a delimiter in a URL. Reference: https://www.ietf.org/rfc/rfc1738.txt[^] RFC 1738, published December 1994 Unsafe: Characters can be unsafe for a number of reasons. The space character is unsafe because...
15 May 2019 by Joan M
Hi all, I'd like to download all the files and folders from an industrial PC in order to automate a backup task. That should be done with a batch file. I've seen mget and get FTP commands, but it seems that is not working recursively and it only detects files as possible targets... folders...
15 May 2019 by phil.o
I cannot find anything in NSFTOOLS: List of FTP commands for the Microsoft command-line FTP client[^] which allows to determine whether a folder's element is a folder or a file. I do not think you will be able to achieve your goal by using purely the script facility of genuine Windows ftp...
18 Feb 2019 by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.
12 Dec 2018 by RickZeeland
With FileZilla it is possible: Filezilla: How to refresh a FTP folder automatically - Super User[^]
6 Dec 2018 by chimcham
Good Day. I would to ask on how can I do File Transfer from FTP A to FTP B using C#. Thank you. What I have tried: I am currently still reading articles and doing research.
6 Dec 2018 by Dave Kreskowiak
There is no such thing as a "copy" operation between FTP sites. You have to download the file from your source FTP server, then update it to your destination FTP server.
24 Aug 2018 by Sérgio Wilker
I'm trying to get the size of a file that is hosted on a server and put it in a "label" while the "BackgroundWorker" works in the background. I'm using "Try" to get the value, however the value is caught on the first attempt, after downloading if I press to try to get it again then it works. ...
31 Jul 2018 by GrahamPye
OK, looking at the source of your home page, it appears to have been created with some sort of framework tool. Try and find out what's been used and how to use it to update the website. Failing that, you'll need to hack it, which does mean that if someone later changes the site "properly", your...
30 Jul 2018 by GrahamPye
Try clicking on the download tab for a similar file (hopefully this functionality is already there) and see what file gets opened in your browser. Then go and look for that in cPanel - use the full directory path to try and find it. But yes, this is what happens to real developers (which I used...
30 Jul 2018 by Sifeziwe Mpanza
I have been tasked with editing and updating a website by a client. I am not a programmer (I think it is important that I start there) and I am trying to update a website hosted on a server using the cpanel. The client sent me a PDF I have to add on the website ASAP. I have already managed to...
30 Jul 2018 by Patrice T
Quote: I have been tasked with editing and updating a website by a client. Looks like you are just not qualified for the job. Quote: This PDF is supposed to be downloadable from the website by clicking on a drop down tab on the home page and selecting it. I would appreciate some assistance with...
27 Jul 2018 by MukeshKumarTech
This article will demonstrate you about what Azure Web App is and how can you create it and deploy your own files using FTP client.
11 Jul 2018 by Rocky Villalobos Bitos Jr.
I have a android device and laptop that servers as my server, I want to transfer file from android device into my laptop that both are using different networks but connected to the same VPN Server (Android is using Mobile Data and Laptop is connected to wifi). Thank you very much! What I have...
11 Jul 2018 by Dave Kreskowiak
That's going to depend entirely on the configuration of the VPN and your other network devices. They have to be setup to allow connections between the two networks. There may be a firewall between the two networks that may need to be configured. Routing may need to be configured. A quick...
11 May 2018 by Richard Deeming
Quote: request.UseBinary = true; Binary mode transfers the file bytes verbatim. The source file was almost certainly created on a Linux or Mac system, which uses a different line-break character than Windows. Set UseBinary to false if you're transferring text files. Or alternatively, read...
11 May 2018 by Sharma Ravi
Hi, I am downloading file from FTP server and saving it into local system. I found that line break is removed during the transfer of file and text file is showing all line in single row. I did following code. Please suggest.public void DownloadFTPFile() { string host =...
3 May 2018 by Laurent mortroux
the soluce working with me try { FtpWebRequest ftpReq = (FtpWebRequest)WebRequest.Create(host + "/" + remoteFile); ftpReq.UseBinary = true; ftpReq.Method = WebRequestMethods.Ftp.UploadFile; ftpReq.Credentials = new...
3 May 2018 by Laurent mortroux
Hello I want to do a service in C# and my service download file on a FTP My code : public string[] directoryListSimple(ITEM Line, string directory) { try { /* Create an FTP Request */ ftpRequest =...
2 May 2018 by Richard MacCutchan
Put all you commands into a text file and then use the -s option to input them into ftp.
2 May 2018 by Member 13808728
While running below mentioned code in windows it work if we pass the date command and then pass parameter. But for FTP it can't put next command as it is going to FTP prompt and process is just waiting there. I need a way to pass another command on same runtime instance....
4 Apr 2018 by Laurent mortroux
I use this and it's work i don't undurstand why??? public List directoryListSimple(ITEM Line, string directory) { List directoryList = new List(); FtpWebRequest request = (FtpWebRequest)WebRequest.Create(host + "/" + directory); ...
4 Apr 2018 by #realJSOP
Try setting the ftpwebrequest.timeout value to -1 (unlimited). The MS docs say it's set to that, but it's actually set to 100000 (100 seconds).
3 Apr 2018 by Peter_in_2780
Since you are using a web request, the filename is being treated as a URL. The character # is a special character in URLs, and needs to be encoded, such as # Other special characters will need similar encoding.
3 Apr 2018 by Shane_Beggs
I'm receiving "The requested URI is invalid for this FTP command" error when attempting to upload any file that contains a "#" in the filename. All other files upload without any issues. If I remove the #, the files upload fine, but this isn't an option as it's required for numerous clients. ...
20 Mar 2018 by nsvrao
Hai Everybody,I need to move the file from one folder to another folder in FTP by renaming it (in C#).I dont know how to move the file from one folder to another folder in FTP.Please let me know how to approach.Thanks in advance,Srinivas.
22 Feb 2018 by jpveldtman
Hi guys,I am facing a problem with my FTP to upload a file to the FTP Server.I keep on getting an error "The remote server returned an error: (451) Local error in processing.I have tried Passive mode, but with no luck. Any recommendations are welcome.Please see my code below:private...
11 Feb 2018 by #realJSOP
There is no need to use MFC from C#. Here's a link that describes the FtpWebRequest object. MSDN Docs for FtpWebRequest [^] Furthermore, there are numerous C# FTP classes, many of which are posted as articles right here on CodeProject. EDIT================================= Look at this Q/A...
9 Feb 2018 by Elgin76
I am writing an application using C# and XAML that needs to access FTP functions. Most, but not all, are provided by FtpWebRequestMethods.Ftp class. What is missing is the ability to execute commands on the remote server. This functionality is available in MFC using the CFtpConnection Class. ...
1 Feb 2018 by Pushkar Prabhu
Hi all, I am using FtpwebRequest to upload files to FTP. I am using WebRequestMethods.Ftp.ListDirectory i.e. NLST FTP command to check if directory exists on FTP or not. But i get randomly 550 as FTP response code for this command even though directory is exists on FTP. I am using Windows...
1 Feb 2018 by RickZeeland
Maybe you can find the answer here: How to check that a specified folder exists on ftp server[^]
22 Dec 2017 by Member 9762654
Hi, I need just to connect ftp through C#. I am having an URI, Username and password.Without giving file name can we connect to FTP? Please help.
22 Dec 2017 by jberssim
If using 3rd-party tools is an option, you can use this FTP library for .NET to connect and transfer files. Here is the example code: // Create a new class instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("localhost"); // Authenticate. client.Authenticate("test",...
15 Dec 2017 by Member 11543226
I am new to FTP, written code to upload and download file which is already present on server folder. But now I am stuck with create new files on server folder. Any suggesion will be appreciate. Tried below method but no effect. What I have tried: ftpreq.Method =...
30 Oct 2017 by Member 13004860
I want to specify the folder in my local system which has to be made remotely available to connected system using vb.net code What I have tried: all i could find is ftp server and client code,but what i require is how to make a specific folder remotely available to connected systems using vb.net
30 Oct 2017 by Patrice T
Quote: but what i require is how to make a specific folder remotely available to connected systems using vb.net Check on FTP server, the part named configuration.
26 Sep 2017 by Graeme_Grant
This 3rd-party library should make it a lot easier for you: GitHub - robinrodricks/FluentFTP: An FTP and FTPS client for .NET & .NET Standard, optimized for speed. Provides extensive FTP commands, File uploads/downloads, SSL/TLS connections, Automatic directory listing parsing, File...
26 Sep 2017 by ANIL AYDINALP
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input;...
7 Aug 2017 by gampapraveen
lot of sites giving information but i am facing issue with creating a pdf file in ftp path using credentials. Tried with stream,filestream and webclient. But my issue is its creating .txt in same location but when trying with pdf it is not creating a file in ftp location. What I have tried: ...
7 Aug 2017 by King Fisher
Tried this ? c# - Upload a file to an FTP server from a string or stream - Stack Overflow[^]
7 Aug 2017 by Dave Kreskowiak
Basically, you can't. You have to create the .PDF file locally and upload it to the FTP server. The same goes for text files too. FTP servers do not support stream operations like reading/writing files directly.
26 Jul 2017 by Satya Prakash Swain
You can refer the following articles:- Reason For File Size Mismatch In FTP And Local Machine[^] Hope it helps.
18 Jul 2017 by RuaaGHAREEB
trying to deploy my vb.net website project using deploying method but non-of them worked ! first i deployed it using the file system method, uploaded it using my FTP Account but the page displays the html code only ! then tried to use the FTP Deploy method but "the components for communicating...
24 Mar 2017 by Garth J Lancaster
am I dense (rhetorical) or do I not get what you want to do .. you don't want to do this var result = RunProcess(@"D:\Webdata", "cmd.exe", "D:\\Webdata\\Copy_All.bat", false);but you have code for a ftp class, yes ... so, surelyvar result = RunProcess(@"D:\Webdata", "cmd.exe",...
24 Mar 2017 by r.abhaysinghania
Firstly sorry i was not able to update the question as I didn't had access to network connection.@Richard and @Sunasara I need to download the data from a particular server say for example //192.16.124.30 to my below directories using windows service so that whenever the service runs it...
22 Mar 2017 by RickZeeland
Try this: private void Download() { // Create an instance of WebClient WebClient client = new WebClient(); client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); // FTP test demo/password string url =...
22 Mar 2017 by Garth J Lancaster
You havnt shown us any code - so its hard for us to help and understand what your issue(s) are. As pointed out, the speed of the network is going to be the same whether you ftp via batch file or via c#I thoroughly recommend using the free library from EnterpriseDT Free .NET FTP library[^] ...
20 Feb 2017 by joshrduncan2012
Hi everyone!I am working on an element of a project that has to do with FTP uploading files. This is the code that I have to upload all types of files.#region FTP Upload// Get the object used to communicate with the server.FtpWebRequest request =...
28 Dec 2016 by Ricky Law
I going to do the list box to show all my files in the ftp server so that the user can select the files and download it. After i typed my ftp server ip address "ftp://192.168.10.1/ in the textbox then clicked the button for display all files listed in the ftp. It shows the messages invalid url :...
28 Dec 2016 by Richard MacCutchan
You should post your question in the forum at the end of the article so the author of the code sees it.