Author Topic: Search for text string in closed and zipped drawings  (Read 5385 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Search for text string in closed and zipped drawings
« Reply #15 on: October 07, 2005, 10:00:08 AM »
Coffee, must get coffee.

 :oops:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Search for text string in closed and zipped drawings
« Reply #16 on: October 07, 2005, 12:22:36 PM »
Ok .. this is what I did ...
Code: [Select]
@echo off
::Change the next line to the root of where you want to start searching files
set BEGINPATH=X:\DWGS\OldDDrive\
echo Search will start in %BEGINPATH%
pause
::dir /a /s /b %BEGINPATH%*.ZIP > temp.txt
::extract all DWG files
For /F "tokens=1* delims= " %%f in ('dir /a /s /b %BEGINPATH%*.ZIP') do unzip.exe -j "%%f %%g" -d tmp/
::if there are any DWG files not compressed copy them as well
For /F "tokens=1* delims= " %%f in ('dir /a /s /b %BEGINPATH%*.DWG') do copy "%%f %%g" .\tmp
::search all DWG files
findstr "L0272" .\tmp\*.dwg
::now lets clean up behind ourselves
For /F "tokens=1* delims= " %%f in ('dir /a /s /b .\tmp\*.dwg') do erase "%%f %%g"
pause
set BEGINPATH=

The result was 8453 files searched took right at 2 hours to extract, search, and cleanup .... regardless of how long it took ... it certainly saved me hours upon hours of manual searching ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Search for text string in closed and zipped drawings
« Reply #17 on: October 07, 2005, 03:02:39 PM »
So you found the dwg(s) okay then?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Search for text string in closed and zipped drawings
« Reply #18 on: October 07, 2005, 03:26:24 PM »
Actually I didn't find them ... but the tool did work for what it was designed to do ... anyway I will keep it handy for future use.

I'll likely expand it a bit and make it a little more user friendly ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie