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-02 14:19
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question about long directory names... please help~~~ View 1,054 Replies 4
Original Poster Posted 2006-11-23 07:06 ·  中国 广东 深圳 电信
初级用户
★★
Credits 142
Posts 61
Joined 2006-06-01 19:41
20-year member
UID 56391
Gender Male
Status Offline
Operating environment: under WINXP and the DOS under WINXP -(not pure DOS)
Under a certain partition there are two directories with the same name, only the number at the end is different.
For example: "Pro Evolution Soccer 5" "Pro Evolution Soccer 6"
Under DOS their names show up as "proevo~1" and "proevo~2"
Using if not exist "X:\proevo~1" xcopy "N:\proevo~1 /i /e" copies “Pro Evolution Soccer 5" to X:....
If after that I also want to use this statement to copy "proevo~2" to X:, then it is:
if not exist "X:\proevo~2" xcopy "N:\proevo~2 /i /e" and it will copy “Pro Evolution Soccer 6" to X:....

I'd like to ask: without changing these two statements, under DOS how can I make it so that when I copy "Pro Evolution Soccer 6" it will automatically check whether the "proevo~1" directory exists, and if it does not, automatically rename the copied "proevo~2" under X: to "proevo~1"
but under WINXP it would still appear as the "Pro Evolution Soccer 6" directory?

Thanks~~~~~!!!!!!


─────────────────── Moderator record ────────────────────
Handled by: namejm
Original title: Question about long file directory names... please help~~~
Note: Because the title is too vague and inconvenient for forum searching and management, please modify the title within three days.
Penalty: Since this user is not a newbie on the forum and should understand this forum's posting rules,
2 points have therefore been deducted from the 4 credits earned for making this post. If no corresponding action is taken within three days after this notice is posted, the moderator will forcibly change the title.
Suggestion: If you object to this handling, please click
hereto go toFeedback & Member Discussion and post an appeal in that section; if this really was improper handling,
I will cancel this action, and if necessary, will also take other appropriate measures to remove the adverse impact on you.
─────────────────── Moderator record ────────────────────


[ Last edited by namejm on 2006-11-23 at 05:58 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
namejm -2 2006-11-24 06:59
Floor 2 Posted 2006-11-23 07:38 ·  中国 广东 深圳 电信
初级用户
★★
Credits 142
Posts 61
Joined 2006-06-01 19:41
20-year member
UID 56391
Gender Male
Status Offline
Don't let this sink~~~!!!!!
Floor 3 Posted 2006-11-23 21:53 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Your description is hard for me to understand.

Try copying 5 over first, then copy 6 over it and see.
Floor 4 Posted 2006-11-23 22:38 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 5 Posted 2006-11-24 06:30 ·  中国 广东 深圳 电信
初级用户
★★
Credits 142
Posts 61
Joined 2006-06-01 19:41
20-year member
UID 56391
Gender Male
Status Offline
It is using xcopy ..under the DOS command line long filenames are not shown completely...
Pro Evolution Soccer 5 shows up as proevo~1 under DOS when viewed with the DIR command
Pro Evolution Soccer 6 shows up as proevo~2 under DOS when viewed with the DIR command
If I write it in a batch file, how can I make it so that in the command line it shows as proevo~1, but in XP it shows as Pro Evolution Soccer 5

Not sure whether you understand what I mean~!!~
Forum Jump: