DATA Step, Macro, Functions and more

deleting empty folders

Reply
Contributor
Posts: 55

deleting empty folders

Hi,

I'm looking for a way to only delete folders (and sub folders) which do not contain any files.

 

For example let's say that c:\2013 (and all of its underlying folders and files) do not contain any files, just folders, how can I get rid of c:\2013 as a whole ? c:\2012 and c:\2014 should remain just like they are.

 

Situation before deleting empty folders

c:\2012

c:\2013

c:\2014

 

Situation after deleting folders

c:\2012

c:\2014

 

Thanks

B

Valued Guide
Posts: 580

Re: deleting empty folders

Posted in reply to Billybob73

Do have to do this with sas? See Maxim 14 in Maxims of Maximally Efficient SAS Programmers.

 

I am sure that a powershell script exists to clean up empty folders.

Ask a Question
Discussion stats
  • 1 reply
  • 84 views
  • 0 likes
  • 2 in conversation