I'm using the Windows Command Processor, (cmd.exe), to scan all the files in a server. My goal is to have a
.txt file with name files and where they are located, (for a faster search).
This is my code:
P: DIR *.* /P /Q /S > C:\Users\aperea01\eng.TXT Z: DIR *.* /P /Q /S > C:\Users\aperea01\CADUsers.TXT R: DIR *.* /P /Q /S > C:\Users\aperea01\eng_restricted.TXT
The batch-file commits its goal, but if I find a folder I have no access, the batch-file stops working. It does write and save the last found files but can't continue.
Is there a way to skip the
Access denied error and continue scanning the server?
Thanks in advance.
R are some of the mapped network drives in my PC.