Re: I could not use it in window service by c# (General questions)
Hi,
At first I used wodFtpDLX.net component but wodFtpDLX, now I have changed to the Com component --- wodFtpDLX; It has not the chinese problem; thanks.
but I found a problem of ftp.RemotePath property, the following is my code, if have no the following code the ftp.RemotePath property value maybe /s/../s/a/.. , so has any other way I can get the real path like /s but /s/../s/a/.. .
My code:
string sRemote = ;
List<string> folderList = new List<string>();
string[] folders = ftp.RemotePath.Split('/');
for (int i = folders.Length - 1; i >= 0; )
{
if (folders == )
{
}
else if (folders == .. )
{
i--;
}
else
{
folderList.Add(folders);
}
i--;
}
for (int j = folderList.Count - 1; j >= 0; j--)
{
sRemote = sRemote + / + folderList[j];
}
if (sRemote == )
{
ftp.RemotePath = / ;
}
else
{
ftp.RemotePath = sRemote;
}
thanks
Complete thread:
- I could not use it in window service by c# - yinpengxiang, 2009-08-19, 08:17
- Re: I could not use it in window service by c# - wodDamir, 2009-08-19, 09:11
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-19, 10:46
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 12:21
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 13:56
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 15:14
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 15:18
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 17:19
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 17:47
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-21, 02:17
- Re: I could not use it in window service by c# - wodDamir, 2009-08-21, 09:06
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-21, 02:17
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 17:47
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 17:19
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 15:18
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 15:14
- Re: I could not use it in window service by c# - wodDamir, 2009-08-20, 13:56
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-20, 12:21
- Re: I could not use it in window service by c# - yinpengxiang, 2009-08-19, 10:46
- Re: I could not use it in window service by c# - wodDamir, 2009-08-19, 09:11