473,799 Members | 2,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieve FTP directory with hidden files

Hello,
i know that this is not a python but a FTP protocol question but maybe
someone in this newsgroup could help me.

I use the standard ftplib.FTP class and get the listing wia
ftp.retrlines(' LIST mydir')
but this does not get hidden files like ".htaccess" and more important
i can't delete directories because they are not empty.
Jul 18 '05 #1
1 2927
Lothar Scholz <du***@scriptol utions.com> wrote:
I use the standard ftplib.FTP class and get the listing wia
ftp.retrlines(' LIST mydir')
but this does not get hidden files like ".htaccess"
This should work:

ftp.voidcmd("CW D mydir")
ftp.retrlines(" LIST -a")

But of course you're at the mercy of the FTP server -- if
it insists on not returning "hidden" files to you, there's
nothing you can do about it.
and more important
i can't delete directories because they are not empty.


Correct. You have to delete the files in them first. The
FTP protocol (RFC959) does not specify recursive removal of
directories, as far as I remember.

Best regards
Oliver

--
Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany

``All that we see or seem is just a dream within a dream.''
(E. A. Poe)
Jul 18 '05 #2

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

Similar topics

2
12364
by: Didier FRAISSE | last post by:
i need to retrieve every day an email and to save his attachments for later processing. i found some piece of code in the documentation like import poplib pop = poplib.POP3(Host) pop.user(User) pop.pass(Pwd) nbMsg, nbOctet = pop.stat() for n in range(nbMsg):
3
2573
by: Stephen Green | last post by:
I'm using the code found at http://support.microsoft.com/?kbid=224364 called Creating a Directory Browsing Page Using ASP. The code works fine. I would like to find a way NOT to show hidden files or folders. I don't know (if it's possible) how to test for the hidden attrobute and create an IF condition that will allow only non-hidden files and folders to show up. Also, can anyone suggest how to add an "up directory" link (like you...
6
8929
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? I am running UDB 8.2 on Linux and AIX. Thanks.
34
2452
by: kevin.watters | last post by:
Hi all, I have a need for a short program: Given a drive letter, it would recursively search through all directories, "generating" each filename that it encounters (need to pass each filename to a function). Can't help but think this "utility" already exists but f**ked if I can find it.
6
1733
by: dkode8 | last post by:
Hello, I am creating an application that uses impersonation to log a user into our domain and then show them the contents of their network share where they store their files. I have all the permissions and impersonation working correctly, Now I have hit a snag on how to get my idea to work.. Right now i have default.aspx, and Directory.cs
12
2544
by: samoore33 | last post by:
I found a real nice article on how to copy a directory on MSDN. The only problem is that I can not figure out how to get the namespace Microsoft.VisualBasic.MyServices. I wanted to know if anyone else has had experience with this, or knows of a different way to copy a directory using VB. I found ways to copy files, but not having a lot of luck with finding a way to copy a directory other then this information I am finding on MSDN.
28
2115
by: Peter Oliphant | last post by:
I have written a program using MS VS VC++ 2005 Express, /cli pure. Upon compiling it it works fine in the GUI development environment. It also works fine as a Debug stand-alone. ut I had an odd behavior when it comes to the Release varsion when I renamed its project directory name it was in! I tracked the problem down to it being the NAME of the DIRECTORY the application is in! Let me explain. I compiled the code, and it worked in ALL...
2
1794
by: David C | last post by:
I have an ASP.Net web site that does some file system folder access. One of the things I am doing is counting the # of files in a passed directory to determine if I show or hide something on the page. My problem is that I want to ignore hidden files in the count but I can't find a way to do this. Below is my code. Can someone let me know if this is possible and how to do it? Thanks. David Public Shared Function FilesInPath(ByVal...
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9540
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.