Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Renaming files in ftplib

Thread Tools

Renaming files in ftplib

Thierry Lam
Posts: n/a
Let's say I have a file called 'test.c' on my local machine and I'm
ftping a file with similar name from a remote computer. I want to
prefix the file ftped over with a T_, how do I do that through ftplib
in python?


Reply With Quote
Posts: n/a
Do for instance:
Step 1. Move the file to another directory from the remote computer -
Step 2. Rename the file here. See, function rename
Step 3. Move the file to the desired directory, use the same function

Reply With Quote
Posts: n/a
how to get files:, see
function retrlines for a textfile
how to rename files: m,
function rename

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: ftplib and retrbinary or retrlines (losing newlinecharacters in my log files) Gabriel Genellina Python 0 01-25-2007 06:28 AM
Problem with FTPLib and incomplete files on some downloads Peter A. Schott Python 1 01-18-2006 07:50 AM
ftplib - issues with some files not completing? Peter A. Schott Python 0 08-23-2005 10:14 PM
FTPLIB - retry files? Peter A. Schott Python 2 01-19-2005 07:34 PM
ftplib question: how to upload files? Python 3 09-12-2003 11:48 AM