I am trying to use the forfiles command to create a report of files older than x days, that reside on my file server.
I have the following:
The above runs perfectly as it is. The drive listed is not my file server, it is another mapped drive that I was using for testing. To run this against my file server it would look like the following:
The problem is that when I try and run it on this drive, I get the following output:
-snip
19941216 4896 u:\ACCPAY\PAGENET.XLS
19941220 3300 u:\ACCPAY\PARKWAY.XLS
FindNextFile - unexpected return code=6 (on FindNext) line 317
Warning : Access denied (during recursion) line 302
Warning : Access denied (on FindFirst) line 274
-EOF
I get the same error if I run the command logged into windows as myself, or the domain admin, remote (drive map), or locally on the server.
Yet I have no problem running a simple dir /s command either logged in under my user accout, or the domain admin.
Can anyone tell me where I screwed up?
Thanks, Chad
I have the following:
Code:
forfiles -s -py:\ -m*.* -d-365 -c"cmd /c echo @FDATE @FSIZE @PATH\@FILE" | sort /O C:\filereports\365daysold.txt
The above runs perfectly as it is. The drive listed is not my file server, it is another mapped drive that I was using for testing. To run this against my file server it would look like the following:
Code:
forfiles -s -pu:\ -m*.* -d-365 -c"cmd /c echo @FDATE @FSIZE @PATH\@FILE" | sort /O C:\filereports\365daysold.txt
The problem is that when I try and run it on this drive, I get the following output:
-snip
19941216 4896 u:\ACCPAY\PAGENET.XLS
19941220 3300 u:\ACCPAY\PARKWAY.XLS
FindNextFile - unexpected return code=6 (on FindNext) line 317
Warning : Access denied (during recursion) line 302
Warning : Access denied (on FindFirst) line 274
-EOF
I get the same error if I run the command logged into windows as myself, or the domain admin, remote (drive map), or locally on the server.
Yet I have no problem running a simple dir /s command either logged in under my user accout, or the domain admin.
Can anyone tell me where I screwed up?
Thanks, Chad