中国DOS联盟论坛

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-09-23 13:29
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » Please provide the specific batch processing code requirements and related details, such as the scope of files (specific folder path, file type, etc.), so that I can write the corresponding batch processing code to achieve adding a two-digit increasing digital sequence number in front of the file name.
Printable Version  3,202 / 0
Floor1 hong363x Posted 2017-04-18 10:30
新手上路 Posts 1 Credits 1
File names and extensions are not specific, possibly other file names and extensions
Original file name Desired effect
AGEM-12.TAP 01-AGEM-12.TAP
DRSG-4_3.TAP 02-DRSG-4_3.TAP
EM-12.TAP 03-EM-12.TAP

Detect the first 3 characters of file names in the folder
1. If there is no sequence number before all file names, then sort by modification time
2. If there is already a sequence number, do not add a sequence number again, and add a sequence number before the file name without a sequence number according to time (PS: if there is already 03-, then start from 04-)

There are quite a few requirements, please help, master!~~~~~~~
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023