Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find a way to get a list of all the Non Read Only files under a specific path on windows server 2003.

I tried the following command, but I also got all the directories which are non Read Only.

DIR c:\Project\Finance /A:-R /S > Open_Files_List.txt

Then I saw on the Web that the "D" attribute might help me, but no matter how i use it, i can't get the wanted result...

Here are the ways I tried to make it work...

/A:-R -D /S
/A:-RD /S
/A:-R -D /S
/A:-DR -D /S
/A:-D /S
/A:-DR /S

As you can guess, no success!

Can you please assist?

share|improve this question
up vote 6 down vote accepted

This seems to work for me.

dir /A:-D-R /S

/A:-D specifies that you don't want directories. -R specifies that readonly attribute isn't present. You did try something similar. But the space between -R and -D confused the dir program...

share|improve this answer
    
What do these parameters do? – Tom Wijsman Nov 16 '11 at 12:45
    
/A:-D specifies that you don't want directories. -R specifies that readonly attribute isn't present. You did try something similar. But the space between -R and -D confused the dir program. – Smetad Anarkist Nov 17 '11 at 13:19

As you specified attributes are working same..

enter image description here check this.. list of non read only files excluding directories.

dir /a-dr

enter image description here

your desired result can be achieved using following command:

dir /a-d-r 

check this in second command result.. just add you recursive search /d after this.. hope this help you..

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .