Dave Calkins
2006-05-27 12:23:01 UTC
I'm attempting to find and remove a bunch of files from an FTP server which
match a specified pattern. The problem I'm having is that the directory on
the server contains a space in the name.
I'm using the MFC WinInet wrapper classes to make use of the API. So, my
code looks like the following:
CInternetSession inetSession;
CFtpConnection * pConnection = NULL;
pConnection =
inetSession.GetFtpConnection(oc->server,oc->userName,oc->password);
CFtpFileFind finder(pConnection);
CStringArray filesToDelete;
BOOL bWorking = finder.FindFile(oc->fileNames);
while (bWorking)
{
bWorking = finder.FindNextFile();
filesToDelete.Add(finder.GetFilePath());
}
What is the correct way to deal with this? I've tried using the following
as arguments to the FindFile() method which do not appear to work.
My?Stuff
My\ Stuff
My*Stuff
match a specified pattern. The problem I'm having is that the directory on
the server contains a space in the name.
I'm using the MFC WinInet wrapper classes to make use of the API. So, my
code looks like the following:
CInternetSession inetSession;
CFtpConnection * pConnection = NULL;
pConnection =
inetSession.GetFtpConnection(oc->server,oc->userName,oc->password);
CFtpFileFind finder(pConnection);
CStringArray filesToDelete;
BOOL bWorking = finder.FindFile(oc->fileNames);
while (bWorking)
{
bWorking = finder.FindNextFile();
filesToDelete.Add(finder.GetFilePath());
}
What is the correct way to deal with this? I've tried using the following
as arguments to the FindFile() method which do not appear to work.
My?Stuff
My\ Stuff
My*Stuff