471,338 Members | 1,295 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

having problems in changing directories doing ftp in python

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!!!!

Jul 7 '07 #1
3 2339
En Sat, 07 Jul 2007 09:41:59 -0300, te*******@gmail.com
<te*******@gmail.comescribió:
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

--
Gabriel Genellina

Jul 9 '07 #2
Hi,

Thank you for your cfomment, also I forgot about the case issue, yes
my web server is unix, not windows
On Jul 9, 4:12 am, "Gabriel Genellina" <gagsl-...@yahoo.com.arwrote:
En Sat, 07 Jul 2007 09:41:59 -0300, tedpot...@gmail.com
<tedpot...@gmail.comescribió:
I'm trying to write aftpin 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 myftpprogram,
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

--
Gabriel Genellina

Jul 9 '07 #3
On Jul 9, 4:37 pm, "tedpot...@gmail.com" <tedpot...@gmail.comwrote:
Hi,

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

On Jul 9, 4:12 am, "Gabriel Genellina" <gagsl-...@yahoo.com.arwrote:
En Sat, 07 Jul 2007 09:41:59 -0300, tedpot...@gmail.com
<tedpot...@gmail.comescribió:
I'm trying to write aftpin 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 myftpprogram,
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
--
Gabriel Genellina- Hide quoted text -

- Show quoted text -
www.hf.com

Jul 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.