Path: utzoo!utgpu!water!watmath!clyde!rutgers!super.upenn.edu!dsl.cis.upenn.edu!catone From: catone@dsl.cis.upenn.edu (Tony Catone) Newsgroups: comp.sys.ibm.pc Subject: Re: fc and wildcards Keywords: won't work Message-ID: <3329@super.upenn.edu> Date: 8 Feb 88 22:04:07 GMT References: <3762@xanth.cs.odu.edu> Sender: news@super.upenn.edu Reply-To: catone@dsl.cis.upenn.edu.UUCP (Tony Catone) Distribution: na Organization: University of Pennsylvania Lines: 26 In article <3762@xanth.cs.odu.edu> kahn@xanth.cs.odu.edu (Gary I Kahn) writes: >The MS/DOS 3.2 manual has examples of using the FC (file comparison) >command with ambiguous file names. When I try to use wildcards (just like >in the examples), the program gives me an "Unable to open text1.*", or >something like that, and it aborts. Anyone have any comments? I want to >compare all of the files in one directory with files of like names in >a parallel (backup) directory. Thanks in advance. You could always use the FOR and IF DOS commands, either in a batch file or interactively (the later method was never explained very well in the PC-DOS manuals I read, way back when). These commands have existed in MS- and PC- DOS since version 2.0, and are very useful for just the sort of thing you want to do. An example: compare all files in \original with like names in \backup. Swich into the \original directory and issue the command for %a in (*.*) do if exist \backup\%a fc %a \backup\%a from the DOS command line prompt. Of course, this runs much slower than file name expansion would from inside fc, since this method loads fc each time a match is found. RAM disks speed everything up. It's not as nice as being able to use ambiguous file names, but it does work across a variety of DOS versions and hardware. - Tony catone@dsl.cis.upenn.edu catone@wharton.upenn.edu