473,383 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 2469
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: kah | last post by:
How do I change a line in a file?? For example I have the follwing text in my file: line1 line2 line3 line4 How do I replace 'line2' with 'newline'. Since the write operation in
1
by: malcolm | last post by:
Hello, We have a small team building a project that involves some 30 or so c# assembly dlls. It is a client server application with 1 exe as the starting point. The dlls and exe are sharing an...
1
by: malcolm | last post by:
Hello, We have a small team building a project that involves some 30 or so c# assembly dlls. It is a client server application with 1 exe as the starting point. The dlls and exe are sharing an...
3
by: Eric S. Johansson | last post by:
I'm developing Python code on multiple VM Ware guest OS running ubuntu. I need to share common file space so that each of these guest instances will have complete access to the to all of the files....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.