VFPConnection Delete File

Just wondering if anyone here is familiar with vfpconnection.fll and if so can you tell me how I would go about Deleting a File on a remote server?

I've tried
Local Array aryFTPCommands(1)
aryFTPCommands(1) = "DELE " + lcImage
lcString = 'FTPCommands("FTP://' + lcUser + ':' + lcPass + '@' + lcDomain + '", @aryFTPCommands, "MyTrace()")'
&lcString

Open in new window

and other variations without any luck.
Other functions work fine - uploading, downloading - I just can't get Delete to work.
formadmirerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jrbbldrCommented:
I'll begin by admitting that I have never used  VFPConnection.fll, but I do execute FTP operations via VFP applications.

I have successfully used modified code originally obtained from the   FTP Client @  http://www.davesummers.net/foxprolinks.htm

It does include an FTP-Delete

And, since all of the source code is there, you might want to look it over.

Good Luck
0
Olaf DoschkeSoftware DeveloperCommented:
The FTP command to delete a file is DELE, correct, but I also read cases where it's rather del. Also unlike VFPs DELETE FILE you can only specify files in the current working directory, AFAIK, so instead of DELE /your/tables/some.dbf you CWD /, CWD your, CWD tables, and finally DELE some.dbf, first move from the FTP root directory to the destination directory, then delete only specifiying the filename. FTP commands are very atomic.

And DELE may also fail on insufficient rights.

Bye, Olaf.

PS: What if you use an FTP client and manually connect and delete a file? Refering the RFC 959 definition of FTP commands, a DELE may cause a safety question "Do you really wish to delete?", even in case you send over commands programmatically. That of course stops the process before files are deleted.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
formadmirerAuthor Commented:
Thanks for the help.

I wound up finding two different options for FTP in VFP, but after hours of getting nowhere with either of them my son created a batch file utilizing DOS FTP to delete the file.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.