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-07 19:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Extra characters appear when using copy with long filenames View 681 Replies 1
Original Poster Posted 2008-03-10 22:37 ·  中国 福建 厦门 电信
初级用户
Credits 74
Posts 37
Joined 2007-06-28 11:47
19-year member
UID 92573
Gender Male
Status Offline
@echo off

set /p name=Please enter the filename you want to copy:
COPY i:\%name%.NC i:\b\%name%.NC

EXIT


There is a file on drive I: gce8011713p0101cdxn010091p0101cdxn010097p0101.nc

When entering gce8011713p0101cdxn010091p0101cdxn010097p0101, it runs correctly

But if I enter *13*91*97*1, the result becomes gce8011713p0101cdxn010091p0101cdxn010097p01013.nc91971.NC
It removed the * from *13*91*97*1 and appended it, for some reason. I don't know why. Please can an expert explain!
Floor 2 Posted 2008-03-10 22:56 ·  中国 福建 福州 连江县 联通
高级用户
★★
Credits 581
Posts 277
Joined 2006-12-23 05:10
19-year member
UID 74328
Gender Male
Status Offline
@echo off

set /p name=Please enter the filename you want to copy:
COPY "i:\%name%.NC" "i:\b\"

EXIT

[ Last edited by suntb on 2008-3-10 at 10:59 PM ]
Forum Jump: