Hello.

I'm attempting to make a small program that can connect to an FTP, download a .php file, edit one small portion of that file, and then reupload the edited version of the file to its original directory. Problem is the coding doesn't seem to work correctly? .

I can connect to the ftp easily, but I can't change directories.

Heres how my test code basically goes.

Upon pressing key 1 > connect to the ftp.

FTP is connected + run once> add line to list "Connected to:" + Current URL (from ftp object.)

Upon pressing key 2 > set current directory "/directoryname/directoryname/"

Upon pressing key 3 > Download File "file.php" (i've also tried this with current directory + "file.php")

The file will appear on my computer, but it will be completely empty. Thing Is that I don't think it really downloads the file in the first place - I beleive It just creates file.php in the desired location.

To test this I also tried leaving the default directory and placing the php file there to download it still with no success.

Then to be even more sure I downloaded the file to my computer, and set it to upload to the default directory, but I still had no success whatsoever. The application would act as if it were uploading something for a split second, but the file would never appear in the ftp.

Does anyone know what the problem could possibly be?

Also. Is there any way that I can load the .php file (as a text file) into the application window and have the app find a word and replace it with another word, then save itself for reupload?

Any help is greatly appreciated!