-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompareFolders.bat
More file actions
50 lines (34 loc) · 799 Bytes
/
CompareFolders.bat
File metadata and controls
50 lines (34 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo OFF
@rem --------------------------------------------------------------
@rem
@rem --------------------------------------------------------------
setlocal
@rem store the drive and path of this file in a variable
set dirname=%~dp0
@rem cd to the directory containing this file
pushd %dirname%
@rem do stuff
if "%1%" == "/?" goto help
if "%%1%%" == "" goto help
if ""%2%"" == "" goto help
dir ""%1"" > folder1.txt
dir ""%2"" > folder2.txt
fc folder1.txt folder2.txt
del folder1.txt
del folder2.txt
pause
goto end
:help
echo.
echo Usage:
echo.
echo CompareFolders.bat ?
echo Displays this message
echo.
echo CompareFolders.bat C:\Folder1Name C:\Folder2Name
echo Compares directory the listings of the two folders.
echo.
:end
@rem cd back to where we started
popd
endlocal