Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75813

Test for an empty directory that could be very large if it is not empty?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <vs@it.uu.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.126
X-Spam-Level *
X-Spam-Evidence '*H*': 0.78; '*S*': 0.03; 'subject:not': 0.03; 'suppose': 0.07; 'subject: \n ': 0.16; 'header:User-Agent:1': 0.23; 'extension': 0.26; 'subject:that': 0.31; 'file': 0.32; '(e.g.': 0.33; 'subject:?': 0.36; 'list': 0.37; 'skip:o 20': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'more': 0.64; 'determine': 0.67; 'subject:Test': 0.84; 'subject:very': 0.91
X-SENDER-IP [213.112.49.116]
X-LISTENER [smtp.bredband.net]
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result ApEMAI2h4lPVcDF0PGdsb2JhbABagkBMgRSDDYQ3qmyaUIdNgS8FAQEBATiEYxV2AgUhAhECMicIAQGIQgGdfY8rll2BLI49gmOBUgEEtFI
X-IPAS-Result ApEMAI2h4lPVcDF0PGdsb2JhbABagkBMgRSDDYQ3qmyaUIdNgS8FAQEBATiEYxV2AgUhAhECMicIAQGIQgGdfY8rll2BLI49gmOBUgEEtFI
X-IronPort-AV E=Sophos;i="5.01,813,1400018400"; d="scan'208";a="624269118"
Date Wed, 06 Aug 2014 23:46:18 +0200
From Virgil Stokes <vs@it.uu.se>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version 1.0
To python-list@python.org
Subject Test for an empty directory that could be very large if it is not empty?
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12711.1407363468.18130.python-list@python.org> (permalink)
Lines 5
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1407363468 news.xs4all.nl 2845 [2001:888:2000:d::a6]:56000
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75813

Show key headers only | View raw


Suppose I have a directory C:/Test that is either empty or contains more 
than 2000000 files, all with the same extension (e.g. *.txt). How can I 
determine if the directory is empty WITHOUT the generation of a list of 
the file names in it (e.g. using os.listdir('C:/Test')) when it is not 
empty?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Test for an empty directory that could be very large if it is not empty? Virgil Stokes <vs@it.uu.se> - 2014-08-06 23:46 +0200
  Re: Test for an empty directory that could be very large if it is not   empty? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-08-07 18:14 +1200
    Re: Test for an empty directory that could be very large if it is not   empty? Cameron Simpson <cs@zip.com.au> - 2014-08-07 17:08 +1000
    Re: Test for an empty directory that could be very large if it is not   empty? Roy Smith <roy@panix.com> - 2014-08-07 07:54 -0400
      Re: Test for an empty directory that could be very large if it is not empty? Peter Otten <__peter__@web.de> - 2014-08-07 14:06 +0200
      Re: Test for an empty directory that could be very large if it is not empty? Tim Chase <python.list@tim.thechases.com> - 2014-08-07 07:05 -0500
        Re: Test for an empty directory that could be very large if it is not empty? Roy Smith <roy@panix.com> - 2014-08-07 08:19 -0400
          Re: Test for an empty directory that could be very large if it is not empty? Tim Chase <python.list@tim.thechases.com> - 2014-08-07 12:37 -0500
            Re: Test for an empty directory that could be very large if it is not empty? Roy Smith <roy@panix.com> - 2014-08-07 21:10 -0400
  Re: Test for an empty directory that could be very large if it is not empty? John Gordon <gordon@panix.com> - 2014-08-07 20:15 +0000

csiph-web