Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

kushagra_tyagi

How to specify the destination path

by kushagra_tyagi » Fri Feb 25, 2005 10:11 pm

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;
}
}

}
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How to specify the destination path

by support2 » Fri Feb 25, 2005 11:14 pm

no avatar
User

kushagra_tyagi

Re: How to specify the destination path

by kushagra_tyagi » Mon Feb 28, 2005 3:34 pm

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How to specify the destination path

by support2 » Mon Feb 28, 2005 9:30 pm

no avatar
User

Kushagra_tyagi

Re: How to specify the destination path

by Kushagra_tyagi » Mon Feb 28, 2005 10:27 pm

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How to specify the destination path

by support2 » Tue Mar 01, 2005 12:30 am

no avatar
User

brfenske

Local path access is denied

by brfenske » Sat Apr 09, 2005 3:50 am

no avatar
User

Guest

by Guest » Sat Apr 09, 2005 3:55 am


Who is online

Users browsing this forum: No registered users and 11 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign