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.
dir %DRIVE_NAME%: /S /C /A-D /Q /T:C | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >> file.info

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 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 at 21:06

1 Answer 1

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$" >> file.info
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.