![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-06 11:21 |
48,039 topics / 350,124 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] Execute the following commands based on the modification time or creation time of the file |
| Printable Version 2,288 / 15 |
| Floor1 fengzi | Posted 2007-11-05 14:36 |
| 中级用户 Posts 152 Credits 315 | |
|
I want the computer to judge the modification time or creation time of a specified file. If it is different from the latest version of the file, automatically record the computer name to the server log. The key is how to compare whether the versions of two files with the same name are the same (the sizes are also the same).
[ Last edited by fengzi on 2007-11-5 at 02:45 PM ] |
|
| Floor2 lxmxn | Posted 2007-11-05 14:51 |
| 版主 Posts 4,938 Credits 11,386 | |
| Floor3 fengzi | Posted 2007-11-05 14:58 |
| 中级用户 Posts 152 Credits 315 | |
|
Thanks lxmxn
If I want to view d:\tools, how should I write it~? |
|
| Floor4 lxmxn | Posted 2007-11-05 15:09 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Command line execution:
|
|
| Floor5 fengzi | Posted 2007-11-05 15:12 |
| 中级用户 Posts 152 Credits 315 | |
|
The execution has no display. I added pause at the back and still can't see the display result. It's estimated that there's an error. Also, I don't know what the role of "neq" is in the command.
|
|
| Floor6 lxmxn | Posted 2007-11-05 15:15 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Try this:
What does neq mean? Have you read the sticky FAQ? |
|
| Floor7 fengzi | Posted 2007-11-05 15:19 |
| 中级用户 Posts 152 Credits 315 | |
|
Still can't display the result.
Dizzy... |
|
| Floor8 lxmxn | Posted 2007-11-05 15:22 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Check carefully if D:\dools exists.
|
|
| Floor9 abcd | Posted 2007-11-05 15:22 |
| 银牌会员 Posts 739 Credits 1,436 | |
|
Where did the landlord execute the above statement? In the P processing file? Or in cmd?
|
|
| Floor10 fengzi | Posted 2007-11-05 15:26 |
| 中级用户 Posts 152 Credits 315 | |
|
I copied it into the command line to execute. The file d:\tools does exist. I don't know if dir /t can be used to achieve it.
|
|
| Floor11 abcd | Posted 2007-11-05 15:30 |
| 银牌会员 Posts 739 Credits 1,436 | |
|
My test is okay, no problem. It can be displayed.
|
|
| Floor12 lxmxn | Posted 2007-11-05 15:31 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Alas well. Told you to look carefully......
Really very depressed. |
|
| Floor13 fengzi | Posted 2007-11-05 15:32 |
| 中级用户 Posts 152 Credits 315 | |
|
The specific situation is that in the Internet café where I am located, there is an issue with the map files of "World of Warcraft" in the e:\Online Games\World of Warcraft\ directory on dozens of client machines, and they cannot run normally. At the same time, the update from the server is very slow and it is easy to cause congestion in the internal network. So I asked the following network administrators to manually update this game. But when several network administrators were updating the game, for some reason, a small part was not updated. What I need to do now is to find these client machines that have not been updated by comparing the times of the game files.
|
|
| Floor14 lxmxn | Posted 2007-11-05 15:34 |
| 版主 Posts 4,938 Credits 11,386 | |
|
I wrote D:\dools
You wrote D:\tools Sometimes a very simple problem can really drive you crazy... |
|
| Floor15 fengzi | Posted 2007-11-05 15:36 |
| 中级用户 Posts 152 Credits 315 | |
|
...
You are on purpose... |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |