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-06-25 19:10
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » [Help] How to write a batch file to copy files from a network drive to the workstation's hard drive View 1,443 Replies 1
Original Poster Posted 2006-11-30 12:23 ·  中国 广东 东莞 电信
初级用户
Credits 40
Posts 16
Joined 2006-11-29 02:32
19-year member
UID 72042
Gender Male
Status Offline
Dear experts:

If the network drive letter mapped in the DOS workstation is H:\, how to write a batch file (such as c.bat) to copy the specified data in the H:\ drive to the hard drive. For example, the user wants to copy the files starting with ABC in the H:\ drive to the C:\ drive. The user only needs to enter C ABC*, and this batch file will automatically copy the files starting with ABC in the H:\ drive to the C:\ drive. Please give some guidance, thank you in advance!
Floor 2 Posted 2006-12-10 05:44 ·  中国 江苏 苏州 昆山市 电信
初级用户
Credits 21
Posts 6
Joined 2006-06-28 10:16
19-year member
UID 57670
Status Offline
Try the following statement by yourself:

@echo off
copy "%1*.* h:\

Then when calling, just use c.bat abc, no need to follow with * after that
Forum Jump: