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-03 14:06
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Get files from a folder based on a keyword View 687 Replies 2
Original Poster Posted 2007-02-17 02:00 ·  日本 东京都
新手上路
Credits 4
Posts 1
Joined 2007-02-17 01:06
19-year member
UID 79657
Gender Male
Status Offline
There are the following files under the C:/data folder:
......
Test20070214.Evt
Test20070215.Evt
Test20070216.Evt

I want to copy the file that matches the system date to C:/copy
For example, if today is 20070216, then copy Test20070216.Evt to C:/copy

Please help me.
Floor 2 Posted 2007-02-17 03:02 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
You don't need to worry about the files in the folder.

Just convert %date% directly into the 20070216 format, then just use copy Test%date2%.Evt C:\
date2 is the converted one...
Floor 3 Posted 2007-02-17 03:20 ·  中国 安徽 合肥 电信
初级用户
Credits 29
Posts 15
Joined 2007-02-17 00:05
19-year member
UID 79653
Gender Male
Status Offline
Sigh..... learning ing~
Forum Jump: