Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 5 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.