Hi,
I am Doni Agna Lourdu. I developeing a small Ftp server. I can able to upload file, Create folder to Ftp Server. I can also List directory details.
But I can able to tell Whether Folder Exsists or Not. So kindly tell me any code or idea for this.
with regards,
Doni
5 13964 SammyB 807
Recognized Expert Contributor
Hi,
I am Doni Agna Lourdu. I developeing a small Ftp server. I can able to upload file, Create folder to Ftp Server. I can also List directory details.
But I can able to tell Whether Folder Exsists or Not. So kindly tell me any code or idea for this.
with regards,
Doni
Just experiment. Doesn't responseText return an empty string if the folder does not exist?
can you explain the process of creating a folder inside a FTP server?
Plater 7,872
Recognized Expert Expert
Are you writing an FTP Server, or an FTP Client?
As an FTP server, you are in charge of making the directories, and thus you could use Directory.Exist s() or any other method you chose since you are creating the server.
If you are creating a client, it is the server's responsibility to handle if the directory exists or not and respond to you with success or failure.
Thank you for your reply.
I am using FTP Client. First I need to share some thing with you . Then only you can understand better.
I need to upload large no of files. But Inside that folder there is possibility of folder with folders. Also I am uploading files one by one. For these resons only I need code to check Folder avilable or not and File avilable or not.
Looking for favorable reply
With regards,
Doni
Are you writing an FTP Server, or an FTP Client?
As an FTP server, you are in charge of making the directories, and thus you could use Directory.Exist s() or any other method you chose since you are creating the server.
If you are creating a client, it is the server's responsibility to handle if the directory exists or not and respond to you with success or failure.
We can create folder in FTP using
folder creation method. FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest) FtpWebRequest.C reate(new Uri("ftp://" + dirName)); reqFTP.Method = WebRequestMetho ds.Ftp.MakeDire ctory; reqFTP.UseBinar y = true;
reqFTP.Credenti als = new NetworkCredenti al(ftpUserID, ftpPassword);
FtpWebResponse response = (FtpWebResponse )reqFTP.GetResp onse();
Stream ftpStream = response.GetRes ponseStream();
ftpStream.Close ();
response.Close( );
can you explain the process of creating a folder inside a FTP server?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: middletree |
last post by:
I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%>...
|
by: Mike Button |
last post by:
Hello all,
I am really really desperate on what I should do, and I am asking for help
from anyone in this newsgroup, here's the situation:
I am creating a form that is being run on a server where there is no scripts
allowed running (the software is from Opentext called Livelink)- therefore I
need javascript to do the tasks listed below:...
|
by: Mark |
last post by:
I got this code from the Internet. Demo on the site works fine but downloaded version is not.
I am a very new to .NET, I cannot figure this out, please help.
Here is the code:
ASPX code:
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %><%@ Page language="c#"...
|
by: Keith Kowalski |
last post by:
I anm opening up a text file reading the lines of the file that refer to a
tif image in that file, If the tif image does not exist I need it to send an
email stating that the file doesn't exist then skip this file and move onto
the next file (line).
If file is there then move to a sirectory.
Here is the code I have (Feel free to make...
|
by: BobAchgill |
last post by:
Is there a special method to find out if a folder exists?
The File.exists method for some reason did not work for
me to see a folder. So I thought maybe there is another
way to see if a folder exists.
Bob
| |
by: David |
last post by:
Hi all,
I have a singleton ienumerable that collects data from a database. I have
listed the code below. It has the usual methods of current, move and reset.
I need to go to a certain position or set filters or many other things and I
don't know how to do this. I have just learned singleton AND ienumerable, so
miraculously got this to...
|
by: Bruce W. Darby |
last post by:
This will be my very first VB.Net application and it's pretty simple. But
I've got a snag in my syntax somewhere. Was hoping that someone could point
me in the right direction.
The history:
My work involves creating custom packages of our software product for golf
courses that purchase our software. The course data is kept as a back up in...
|
by: trint |
last post by:
How can I do this with my c# code with my website(because the file is
there, but the code doesn't return it)?:
if(File.Exists(String.Format("~/images/categories/{0}", sFileName))
return String.Format("~/images/categories/{0}", sFileName);
else if(File.Exists(String.Format("~/images/products/{0}",
sFileName))
return...
|
by: AshishMishra16 |
last post by:
HI friends,
I am using the Flex to upload files to server. I m getting all the details about the file, but I m not able to upload it to Server. Here is the code i m using for both flex & for Struts:
import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |