473,396 Members | 1,707 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,396 software developers and data experts.

List all files using FTP

Hello,

I need to list all the files on my FTP account (multiple subdirectories). I
don't have shell access to the account.

anyone that has a program that will do this?

// Anders
--
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may improve my English!
Mar 6 '08 #1
4 3166
On Mar 6, 10:46 am, Anders Eriksson <andi...@gmail.comwrote:
I need to list all the files on my FTP account (multiple subdirectories). I
don't have shell access to the account.
anyone that has a program that will do this?
Not offhand, but you can look at the ftpmirror.py script for
inspiration.
It should be in your Tools/scripts/ subdirectory of your Python
installation.

....
Jay Graves
Mar 6 '08 #2
On Thu, Mar 6, 2008 at 6:11 PM, jay graves <ja********@gmail.comwrote:
On Mar 6, 10:46 am, Anders Eriksson <andi...@gmail.comwrote:
I need to list all the files on my FTP account (multiple subdirectories). I
don't have shell access to the account.
anyone that has a program that will do this?

Not offhand, but you can look at the ftpmirror.py script for
inspiration.
It should be in your Tools/scripts/ subdirectory of your Python
installation.
This might be of use:

<http://ftputil.sschwarzer.net/trac>

--
Cheers,
Simon B.
si***@brunningonline.net
http://www.brunningonline.net/simon/blog/
Mar 6 '08 #3
On Thu, 6 Mar 2008 20:07:46 +0000, Simon Brunning wrote:
This might be of use:

<http://ftputil.sschwarzer.net/trac>
Nice, Just what I needed!

Thank you!

// Anders
--
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may improve my English!
Mar 7 '08 #4
On 6 Mar, 18:46, Anders Eriksson <andi...@gmail.comwrote:
Hello,

I need to list all the files on myFTPaccount (multiple subdirectories). I
don't have shell access to the account.

anyone that has a program that will do this?

// Anders
--
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may improve my English!
If you mean listing ALL files including those contained in sub
directories if the server supports globbing you can issue a "STAT *"
command and receive the list of all files on the command channel in an
"ls -lR *"-like form.
Not tested:
>>import ftplib
f = ftplib.FTP()
f.connect('ftpserver.domain', 21)
f.login()
f.sendcmd('STAT *')
an "ls -lR *" is expected to come
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brad Tilley | last post by:
I was using Python to tar up some files each day in a directory by calling os.popen("/bin/tar.......). Everything was working well until the app that generated the files was set to generate a file...
2
by: Bart Plessers \(artabel\) | last post by:
Hello, I am developping a web-based file browser. Everything so far so good right now. To make the userinterface more conveniant, I want to split my file list in pages. with Set oFSO =...
35
by: Thierry Loiseau | last post by:
Hello all, and Happy end year 2005 ! Well, I would like to obtain a list of all JavaScript var statement, With "for...in" perharps ? That is bellow my recent test here, but the problem is...
10
by: Craig Lister | last post by:
I'm a newbie.. I'm trying to list all files in a directory, and store them in a aFile object. As I iterate through each file, I store the size, name, path, date etc... How do I store them...
3
by: cmacn024 | last post by:
Hi folks, I've got a question for yas. I'm trying to write code that will open up a gzipped tar file using gnutar, and copy the list of files(including their directories) to a list variable in...
4
by: maglev_now | last post by:
I'm using .net 1.1 trying to get a list of files in folder on the server. The user would select the file they want to download from a DropDownList. Can someone tell me how this should be done? I...
4
by: sam | last post by:
Hi all, Kindly have a look to the code given below ***************************************************************************** Public Function CountFiles(strDir As String, Optional SubDir As...
2
by: Jerry | last post by:
Hi!, I am just starting out in c# here and what I want to do is get a list of files, list them in a a listBox. I want the to beable to select either 1, 2, ... ALL files in this list and execute...
4
by: zacks | last post by:
Most applications whose purpose is to work with various types of files implement a "Most Recent Files" list, where the last, say, four files accessed by the application can quickly be re-opened by...
8
by: dmp | last post by:
What are Linked list? Please somebody show some ready made programs of linked list
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.