472,958 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 2451
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.