Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
dir %DRIVE_NAME%: /S /C /A-D /Q /T:C | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >>

I am using above command to list all information in file, as below:

03/27/2013  01:02 PM   86,280 uusr\fr02        h123_frf67_rk_20140327.txt
03/27/2013  01:02 PM    5,513 usr\fr02         h123_frf67_rk_20140328.txt

%DRIVE_NAME%: is mapped drive.

Folders will be the same; not more than 100 folders and their sub-folders, and there will only be 2 or 3 files at time in any one of the folders.

Now the issues is that for one folder it works perfect, but for 80 to 90 folders it is taking too much time.

I think it's because of findstr and the different extensions used. Is there any way to make it faster?

share|improve this question
If you just run the dir %DRIVE_NAME%: /S /C /A-D /Q /T:C , does it happen as fast as you'd expect? – Ƭᴇcʜιᴇ007 Mar 27 '14 at 20:51
yes Just tried it happens fast. but got to know process is getting stuck because there are 2 folders to which the perticular User is not having access. Access denied Unable to create directory - \\drive\myfolder is there any way to do not wait for retry like we have in robocopt /R:0 – user2405934 Mar 27 '14 at 21:06

Try using

dir %DRIVE_NAME%: /S /C /A-D /Q /T:C *.zip *.doc *.xls *.xpt *.cpt *.cpo *.xlsx *.pdf *.dat *.txt *.docx *.csv | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >>
share|improve this answer

You must log in to answer this question.

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