Hi folks
i am looking to check the contents of two (hopefully) identical folders on two different servers to check that they are identically replicated. i have tried the following
@echo off
set "data=P:\
set "arch=E:\filepath
set "log=E:\logfile.txt"
rem echo N| comp "%data%" "%arch%" 2>nul 1>nul &&echo Equal> "%log%" ||(
fc "%data%" "%arch%" >nul &&echo Equal> "%log%" ||(
echo Not equal> "%log%"
for %%a in ("%data%" "%arch%") do if "%%~za"=="0" echo Zero sized %%a>> "%log%"
)
but this just returns as them not being equal. P:\ is the mapped drive is there an easy way to use the full share path as i just get an empty log file when using \\server\filepath and \\server2\filepath do i need to put in a switch or anything?
thanks in advance
H
check the contetns of two folders
Moderator: DosItHelp
-
- Posts: 319
- Joined: 12 May 2006 01:13
Re: check the contetns of two folders
you can download diffutils for windows, then do this
Code: Select all
c:\> diff c:\myfolder1 c:\myfolder2
Re: check the contetns of two folders
the problem is they reside on different servers.
one folder is mapped to the other server so should be able to use P:\ and then E:\folder path
but it just returns an empty log.
is there string for all files contained within? i could try that after P:\?
one folder is mapped to the other server so should be able to use P:\ and then E:\folder path
but it just returns an empty log.
is there string for all files contained within? i could try that after P:\?