Re: Check if directory is empty on Win32



Leonid L schreef:

Many of the proposed solutions I've found on Google do not work for
me, perhaps because they assume Unix/Linux host. I need a sub that
will reliably tell me whether a given directory is empty (I am running
Perl on Win XP, NTFS file system). Please give your implementation a
quick test on a similar platform before posting.

perldoc -f glob

For example:

perl -wle "my @e=<C:/temp/{.*,*}>; print( -d $_ ? qq{$_/} : $_) for
@e"

--
Affijn, Ruud

"Gewoon is een tijger."

.



Relevant Pages

  • Re: Skip function if data sheet is empty
    ... Just place a label after the Graph sub program and use a GoTo ... statement to go there if data2 is empty. ... empty I'll recorded it empty and go to next file. ... If the Data2 worksheet is empty then ...
    (microsoft.public.excel.programming)
  • Re: UserForm problems
    ... Private Sub btnSUBMIT_Click ... Dim ProtectType As Integer, i As Integer ... ' Check for any empty textbox ... String, TextToUse As Variant) ...
    (microsoft.public.word.vba.userforms)
  • Re: Filtered list
    ... Sub testme() ... Dim RngToFilter As Range ... 'no visible rows in filter. ... filter so as to select all the cells that are not empty. ...
    (microsoft.public.excel)
  • Re: Looping Through Variables
    ... Sub RunCheck ... I am assuming that you use "empty" instead of "" to check if the cell is empty. ... Dim CL ... The next code "RunCheck" is what checks the variable list. ...
    (microsoft.public.excel.misc)
  • Re: Skip function if data sheet is empty
    ... empty I'll recorded it empty and go to next file. ... If the Data2 worksheet is empty then ... Sub Program() ... 'This will start the timer and save it in cell C1. ...
    (microsoft.public.excel.programming)