John,
Thanks for help! Took me a couple of tries to get the syntax correct when
using variables for the names, but did get it to work. (Had to manually add
quotes [Chr(34)] around the file names because they contained embedded
spaces. Apostrophes won't work there.)
BruceS
"John Nurick" wrote:
> Hi Bruce,
>
> Something like
>
> shell("CMD.EXE /C COPY F1.txt + F2.txt + F3.txt new.txt")
>
> On Fri, 25 Feb 2005 13:51:03 -0800, BruceS
> <(E-Mail Removed)> wrote:
>
> >Hi, guys!
> >
> >Running A2K, need to copy multiple text files to a single, new text file.
> >FileCopy assumes that the destination is a folder if wildcards are used for
> >the source, so I get an "Invalid Path" error when running the following code:
> >
> >Dim fs
> >set fs = CreateObject("Scripting.FileSystemObject")
> >fs.CopyFile "C:\*.txt", "C:\CombinedFile.txt"
> >
> >Can anyone help with another way to do this?
> >
> >Thanks,
> >BruceS
> >
>
> --
> John Nurick [Microsoft Access MVP]
>
> Please respond in the newgroup and not by email.
>
|