7

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?

0

2 Answers 2

11

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

2
  • What do these parameters do? Nov 16, 2011 at 12:45
  • 1
    /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. Nov 17, 2011 at 13:19
2

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

You must log in to answer this question.

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