China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 21:19
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can I use a batch file to compare this and delete the extra files? View 1,012 Replies 3
Original Poster Posted 2007-02-15 03:41 ·  中国 重庆 沙坪坝区 电信
中级用户
★★
金牌会员
Credits 315
Posts 152
Joined 2007-01-25 23:55
19-year member
UID 77669
Gender Male
Status Offline
I want to update a series of new files from the server to the local machine. Both folders are named tools and both contain files.
What I want to do is compare the local files with the files on the server, and after the comparison delete the extra files in the local TOOLS without deleting everything completely.
Assume the server IP is 192.168.0.1 and the local machine is 127.0.0.1.
How should this batch file be written`?
I'm a newbie`can anyone tell me how to write it`
Floor 2 Posted 2007-02-15 04:13 ·  中国 重庆 沙坪坝区 电信
中级用户
★★
金牌会员
Credits 315
Posts 152
Joined 2007-01-25 23:55
19-year member
UID 77669
Gender Male
Status Offline
The workload is too heavy```I hope someone can help me``
Floor 3 Posted 2007-02-15 07:11 ·  中国 重庆 沙坪坝区 电信
中级用户
★★
金牌会员
Credits 315
Posts 152
Joined 2007-01-25 23:55
19-year member
UID 77669
Gender Male
Status Offline
Floor 4 Posted 2007-09-19 10:09 ·  中国 广东 广州 电信
初级用户
★★
Credits 170
Posts 72
Joined 2007-03-11 22:16
19-year member
UID 81435
Gender Male
Status Offline
A dumb method:

Map the server directory to a local drive letter, then write the comparison script on the client side, so it automatically compares the files as soon as it starts up.
Forum Jump: