Friday, 19 June 2020

Internal Search Spider in CMD

The aim of this post is to help you make an internal search spider using CMD. A search spider is a program which searches all the files in your system to find the files which contain your keyword. 

First start Notepad or Notepad++ on your computer.
 
Now type:
    @echo off
    title Search Everything
    echo Welcome to Search Everything
    echo ----------------------------
    cd c:\windows\system32
    set /p e=Enter your search word: 
    set /p n=Name of file to send data (no extension): 
    echo '
    echo Your data is being sent to %n%.txt at desktop
    echo '
    echo This process may take some time. Please don't close this window.
    echo Searching C: drive... >> c:\users\%username%\desktop\%n%.txt
    dir /s c: |find "%e%" > c:\users\%username%\desktop\%n%.txt
    echo C: drive searched. >> c:\users\%username%\desktop\%n%.txt
    echo '>> c:\users\%username%\desktop\%n%.txt
    echo Searching D: drive... >> c:\users\%username%\desktop\%n%.txt
    dir /s d: |find "%e%" >> c:\users\%username%\desktop\%n%.txt
    echo D: drive searched. >> c:\users\%username%\desktop\%n%.txt
    echo '>> c:\users\%username%\desktop\%n%.txt
    echo Searching E: drive... >> c:\users\%username%\desktop\%n%.txt
    dir /s e: |find "%e%" >> c:\users\%username%\desktop\%n%.txt
    echo E: drive searched. >> c:\users\%username%\desktop\%n%.txt
    echo '
    type c:\users\raj\desktop\%n%.txt |more
    pause
Now save the file as Search.cmd on the desktop.
When you enter your keyword, the program will check C: drive, E: drive and D: drive to check for any instances of the keyword on your system files. This program takes a lot of time to search the whole computer, but still, it is perfectly working.

No comments:

Post a Comment

Algorithmic Pixel Art: The Beauty of Aliasing

Discussed  here More images in  Google drive Some outputs: Forward to anyone who says aliasing is ugly.