having problems in changing directories doing ftp in python

T

tedpottel

Hi,

I'm trying to write a ftp in python to send files to my webserverr.
Curtly I will change the directory to the folder name, down load the
file, then do a chnag dir ..\ to go back to the root diretory, chnag
the directory, save the file, do a ../.

Instad of going back one directory by doing ..\, could I just go to
the root directory? Currtly I get a error saying file does not exist.

When I log onto my server using my ftp program,
The current path reads /home/admin/
I change the directory to mainwebsite_html.
The line that tells you the current directory now reads VAR/WWW/HTML.

When I use python, I
1. change the directory to mainwebsite_html
2. change the directory to ted
3. try to go back by changing the directory to "var/www/html" in which
I get an error saying it does not exist.

When changing a directory in ftp must it be relative?? Help!!!!
 
G

Gabriel Genellina

En Sat, 07 Jul 2007 09:41:59 -0300, (e-mail address removed)
I'm trying to write a ftp in python to send files to my webserverr.
Curtly I will change the directory to the folder name, down load the
file, then do a chnag dir ..\ to go back to the root diretory, chnag
the directory, save the file, do a ../.

Instad of going back one directory by doing ..\, could I just go to
the root directory? Currtly I get a error saying file does not exist.

Use the pwd command to see exactly which is your current directory.
When I log onto my server using my ftp program,
The current path reads /home/admin/
I change the directory to mainwebsite_html.
The line that tells you the current directory now reads VAR/WWW/HTML.

When I use python, I
1. change the directory to mainwebsite_html
2. change the directory to ted
3. try to go back by changing the directory to "var/www/html" in which
I get an error saying it does not exist.

If your server file system is case sensitive (likely if it's a linux/unix
server), VAR/WWW/HTML is not the same thing as var/www/html
 
T

tedpottel

Hi,

Thank you for your cfomment, also I forgot about the case issue, yes
my web server is unix, not windows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top