ST3VO
asked on
idFTP Upload from Listbox
Hi experts,
I need to upload using idFTP a list of files which are populated inside a listbox.
The problem is that I need to create the folder on the FTO site if it doesn't exists.
For example:
ftp://whatever//images/bikes/123.jpg
Let's supports the folder bikes does not exists...then I need it to create it and upload the 123.jpg file.
Basically I need it in a loop so all the list from the listbox is uploaded.
Hope you can help!
Thanks
ST3VO
I need to upload using idFTP a list of files which are populated inside a listbox.
The problem is that I need to create the folder on the FTO site if it doesn't exists.
For example:
ftp://whatever//images/bikes/123.jpg
Let's supports the folder bikes does not exists...then I need it to create it and upload the 123.jpg file.
Basically I need it in a loop so all the list from the listbox is uploaded.
Hope you can help!
Thanks
ST3VO
St3vo,
Do you have another listbox with the locations of the files to be uploaded or are they just in one directory on your local machine? Just need to know where thos files being FTPed are coming from.
The problem is two fold, parsing the FTP list for just the one directory and checking if a directory exists since IdFTP does not have a Directory Exists type function. But I may have an idea on the FTP part. (Parsing has always been tough for me).
John
Do you have another listbox with the locations of the files to be uploaded or are they just in one directory on your local machine? Just need to know where thos files being FTPed are coming from.
The problem is two fold, parsing the FTP list for just the one directory and checking if a directory exists since IdFTP does not have a Directory Exists type function. But I may have an idea on the FTP part. (Parsing has always been tough for me).
John
ASKER
Hi John,
Yes I do have the whole url including the filename to be uploaded!
p.s: I'm currently banging my head and I'm about to break my pc into 1000000 piece :o/
I'm try to get Question: Q_23012985.html sorted :o(
Why are things always sooo complicated??? Grrr
Yes I do have the whole url including the filename to be uploaded!
p.s: I'm currently banging my head and I'm about to break my pc into 1000000 piece :o/
I'm try to get Question: Q_23012985.html sorted :o(
Why are things always sooo complicated??? Grrr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ST3VO,
THERE IS ONE CHANGE ... In the function:
IdFTPComp.List(DirList, DirName, False);
(within the FTPDirExists), change False to True, i.e.
IdFTPComp.List(DirList, DirName, TRUE);
True makes it silent.
I did test it within the FTP Client demo that Indy has in its Indy9 demo zip, but just wondering if it worked in your setting and situation..
Thanks. And Let me know when you can if this worked.
John
THERE IS ONE CHANGE ... In the function:
IdFTPComp.List(DirList, DirName, False);
(within the FTPDirExists), change False to True, i.e.
IdFTPComp.List(DirList, DirName, TRUE);
True makes it silent.
I did test it within the FTP Client demo that Indy has in its Indy9 demo zip, but just wondering if it worked in your setting and situation..
Thanks. And Let me know when you can if this worked.
John
ASKER
Thanks John!!! :o)
i.e. If you know you can log into ftp://whatever/ (root), fire try-excepted mkdir images, then cd images, then mkdir bikes, then cd bikes...
looks like a lot of useless traffic, but it seems to work