I'm new to this forum and need your help.
I have a server with packages that I have to install on new computers. Because I can't always use the link to the server I've put some packages on my USB-drive to install locally (which is faster). What I want to do is make a bat-file that checks if a new version of the file is available on the server and copies it to my pendrive.
This is what I've got so far, but once again I'm not a doswizard

Code: Select all
@echo off
set FL=(test1.pkg test2.pkg test3.pkg test4.pkg test5.pkg)
set flag=
for /f "skip=3 tokens=1-3,*" %%a IN ('dir *.pkg /a-d /tc') do (
if /i "%%d"=="bytes" set flag=1
if not defined flag if not "%%d"=="" (
echo Filename: %%d
echo cdate: %%a
echo ctime: %%b
echo size: %%c
echo.
)
)
The problem is I don't know how to easily compare only the files in FL with the files on the server, let's say on location \\10.134.146.3\dis\in_tray
Maybe a 2 dimentional array that stores cdate, ctime, size and compares it in another for-loop when getting the data from there?
How can I nest my FL in the existing for-loop?
Note there are only 5 packages in the FL but normally it's a lot more.