home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- REM This is DUPFILE.BAT
- REM
- REM DUPFILE.BAT searches for duplicate filenames in two disk or directories.
- REM It reports which files are in both places and which files are in the
- REM current directory, but not which are in the second drive or directory
- REM specified. To use it, log into one directory or disk and specify the
- REM other after DUPFILE.
- REM Example: DUPFILE c:\dos
- REM
- IF %1!==! GOTO OOPS
- ECHO Checking files . . .
- FOR %%A IN (*.*) DO IF EXIST %1\%%A ECHO %%A is in both places.
- PAUSE
- FOR %%A IN (*.*) DO IF NOT EXIST %1\%%A ECHO %%A is NOT in %1
- GOTO END
- :OOPS
- ECHO This earches for duplicate filenames in two disk or directories.
- ECHO First, make sure %0.BAT is in a directory that your PATH knows about.
- ECHO Then log into one of the directories or disk that you want to examine,
- ECHO and enter the name of the other directory or disk after %0.
- ECHO So to see a list of all filenames that are in both C:\DOS and B:,
- ECHO log in to C:\DOS and type:
- ECHO.
- ECHO %0 B:
- ECHO.
- ECHO Or log into B: and type:
- ECHO.
- ECHO %0 C:\DOS
- ECHO.
- ECHO To check 2 subdirectories called \DOS4 or \DOS5,
- ECHO log into \DOS4 and type:
- ECHO.
- ECHO %0 \DOS5
- ECHO.
- ECHO Or log into \DOS5 and type:
- ECHO.
- ECHO %0 \DOS4
- ECHO.
- :END
-