Hello Sean,

> Yahoo is behaving very strangely recently.
> My earlier message hasn't arrived yet.

It looks like Yahoo sometimes takes ages to process their incoming emails.
My first message in the thread "[power-pro] Bruce about error messages"
took a full two days to arrive (sent by email).
So I went to the Yahoo Groups website and used the form there to send
another copy. That one arrived after a few minutes.

You wrote:
> do(if(not file.listfiles(arg(1),1),"file.deletenorecycle(arg(1))"))

and in snowman's thread:

> do(if(not file.listfiles(?"C:\path",1),?'file.deletenorecycle(?"C:\path")'))

Ah yes, I was looking at the if( , ) function
but I didn't think of wrapping it in a do()

Your solution doesn't work recursively when tested here.

I used a test tree where the parent folder has a file
and only some of the subfolders contain a file:

c:\test\  contains: file.txt

c:\test\one\  contains: file.txt
c:\test\one\onesub\ contains:  [no files]

c:\test\two\  contains: [no files]
c:\test\two\twosub\  contains: [no files]

c:\test\three\  contains: [no files]
c:\test\three\threesub\  contains: file.txt

My script works, deleting all empty folders and no files.
Maybe it can only be done with a subroutine.

;;----------- DelEmptyFolders.powerpro ------

;; arg(1) is the parent folder
file.allfiles(arg(1),"[EMAIL PROTECTED](_file_)",5)
quit

@sub
;; arg(1) is one of the subfolders
if(not file.listfiles(arg(1),1))
  file.delete(arg(1))
quit

;;---------------------------------------




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to