How to get a list of non read only files in Windows?

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?


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...


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..