Is there any way to download files from an FTP site if they're located in a subdirectory?
Thanks,
Marshall
Should work file if you specify the subfolder(s) in the URL, i.e. something like subdir/myfile.zip
What I want to do is is download several files from the subdirectory, but only the ones that are newer than the ones in the download directory. My URL right now is "ftpdirectory*.jpg", but, of course, this won't use the subdirectory. Also, CopyNewerOnly won't work even though I am providing a date. I've thought about downloading a list of the files, checking each for dates, and then downloading only the newer files one at a time, but I don't know how to get the list of files in the subdirectory either. I have tried "ftpdirectory"+subdirectory+"*.jpg" for the URL, but it won't work. Any suggestions?
Thanks,
Marshall
What you're trying to do is not directly supported in TWebCopy and is not really how we designed the functionality for CopyNewerOnly.
You'd first need the command to get the dir. list of the FTP folder and then in a 2nd stage, create a list of TWebCopyItem's for each file returned from the FTP dir list command.
How do I get the list of images if they are located in the subdirectory? The URL for this is ftpdirectory/.. How can I make it look in the subdirectory?
Thanks,
Marshall
Can't be done, I guess.
Thanks,
Marshall
Set URL = subfoldername
Hi
Get list, select the files that need, up/dowload
sample:
// Upload
WebCopy1.Items[0].Protocol:=wpFtpUpload;
WebCopy1.Items[0].URL:='e:\dNetTest.dat';
// DownLoad
WebCopy1.Items[1].Protocol:=wpFtp;
WebCopy1.Items[1].URL:='dNetTest.dat';
WebCopy1.Items[1].TargetDir:='E:';
// delete file
WebCopy1.Items[2].Protocol:=wpFtpDelete;
WebCopy1.Items[2].URL:='dNetTest.dat';
// list
WebCopy1.Items[3].Protocol:=wpFtpList;
Host, port, id, passw are same in all example.