Hi,
Im using this class. When I transfer files. it takes only file name in destination path and get the file from remote to the location, where my demo application is put . e.g. in in Demo/bin/debug. Even If I specify the full path it says access to file is denied.
Please do the needful.
sample code is given below.
error in line
ftp.Get(strfile.Name ,strfile.Name);//If the specify the path here in ist param, it gives the error
public void CopyFilesAndDir(string roolDir)
{
DirFile df;
ArrayList alDirs= new ArrayList();
ftp.ChDir(roolDir);
string[] files = ftp.Dir(".", false);
for (int i = 0; i < files.Length; i++)
foreach(string file in files)
{
try
{
FTPFile[] fp= ftp.DirDetails(file);
// FTPFile dir=(FTPFile)(file);
if(fp.Length>1) //directory
CopyFilesAndDir(file);
else
foreach(FTPFile strfile in fp)
ftp.Get(strfile.Name ,strfile.Name);//If the specify the path here in ist param, it gives the error
}
catch(Exception ex)
{
string str=ex.Message;
}
}
}