I'm trying to use a batch file to automate the process of copying a set of directory trees and their files from a floppy disk in drive A: over to RAM drive E: on my old laptop running MS-DOS 6.21.
I figure that the source of the problem is that I'm using the same name for both a file and a directory, like this:
Directory name: 0SUB-TST.DIR
File name: 0SUB-TST.TXT
When I manually enter the XCOPY command at the DOS prompt, DOS gives me back this query:
- Does 0SUB-TST.DIR specify a file name
or directory name on target?
(F = file, D = directory)?"
What I'm trying to figure out is how I could write a batch file that would answer that query with the equivalent of my pressing the "D" key on my keyboard.
I tried putting "<D" in the batch file at the end of the XCOPY command but that didn't work.
Here's what my non-working batch file looks like:
Code: Select all
:: TREECOPY.BAT: Copies test directory trees from A: to E:
:: for use with ENC-E2DX.BAT
::
@echo off
XCOPY A:\0SUB-TST.DIR E:\0SUB-TST.DIR /S /E /V
::
:: DOS returns query: "Does 0SUB-TST.DIR specify a file name
:: or directory name on target?
:: (F = file, D = directory)?"
::
XCOPY A:\0SUB-TST.DIR E:\0SUB-TST.DIR /S /E /V
XCOPY A:\1SUB-TST.DIR E:\1SUB-TST.DIR /S /E /V
XCOPY A:\2SUB-TST.DIR E:\2SUB-TST.DIR /S /E /V
:end
-----
Will in Seattle
a.k.a. "Clueless"