Sign in with
Sign up | Sign in
Your question

DOS Command/Batch File/Copy Question

Last response: in Windows XP
Share
Anonymous
June 24, 2005 10:34:52 PM

Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

I have a file containing many files with a name in the format
FILENAME.txt.MMDDYY. I want to end up with a merged file of all the data.
For example, this might be 52 files containing bestsellers for each week of
the year.

Currently I am using a batch (.bat) file with:
copy *.txt.* COMBINED.txt
This works fine. (The actual batch file contains the full path name.)

What I want to do is have the merged file (COMBINED.txt) have the same name
as the input so that it will be FILENAME.txt. FILENAME can be any name but
will be the same for a single merge. I want the batch file to look at the
input first name and use it for the output first name. Is this possible? I
don't want to edit the batch file each time.
Anonymous
June 24, 2005 10:37:38 PM

Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

First sentence should be "I have a folder containing many files ..."

"Dennis Marks" <denmarks@yahoo.com> wrote in message
news:uQ2fYYSeFHA.220@TK2MSFTNGP12.phx.gbl...
>I have a file containing many files with a name in the format
>FILENAME.txt.MMDDYY. I want to end up with a merged file of all the data.
>For example, this might be 52 files containing bestsellers for each week of
>the year.
>
> Currently I am using a batch (.bat) file with:
> copy *.txt.* COMBINED.txt
> This works fine. (The actual batch file contains the full path name.)
>
> What I want to do is have the merged file (COMBINED.txt) have the same
> name as the input so that it will be FILENAME.txt. FILENAME can be any
> name but will be the same for a single merge. I want the batch file to
> look at the input first name and use it for the output first name. Is this
> possible? I don't want to edit the batch file each time.
>
>
>
>
June 25, 2005 10:10:01 AM

Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

Dennis Marks wrote:

> I have a file containing many files with a name in the format
> FILENAME.txt.MMDDYY. I want to end up with a merged file of all the data.
> For example, this might be 52 files containing bestsellers for each week of
> the year.
>
> Currently I am using a batch (.bat) file with:
> copy *.txt.* COMBINED.txt
> This works fine. (The actual batch file contains the full path name.)
>
> What I want to do is have the merged file (COMBINED.txt) have the same name
> as the input so that it will be FILENAME.txt. FILENAME can be any name but
> will be the same for a single merge. I want the batch file to look at the
> input first name and use it for the output first name. Is this possible? I
> don't want to edit the batch file each time.
>
>
>
>

Google for XP batch file commands. Variables are similar to old DOS and
what you want.

John
Anonymous
June 25, 2005 4:00:35 PM

Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

I don't understand what you want. You can do what you want (I understood enought to tell that) but I don't get the details.

--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.htm...
=================================================
"Dennis Marks" <denmarks@yahoo.com> wrote in message news:%23ubT7ZSeFHA.2180@TK2MSFTNGP12.phx.gbl...
> First sentence should be "I have a folder containing many files ..."
>
> "Dennis Marks" <denmarks@yahoo.com> wrote in message
> news:uQ2fYYSeFHA.220@TK2MSFTNGP12.phx.gbl...
>>I have a file containing many files with a name in the format
>>FILENAME.txt.MMDDYY. I want to end up with a merged file of all the data.
>>For example, this might be 52 files containing bestsellers for each week of
>>the year.
>>
>> Currently I am using a batch (.bat) file with:
>> copy *.txt.* COMBINED.txt
>> This works fine. (The actual batch file contains the full path name.)
>>
>> What I want to do is have the merged file (COMBINED.txt) have the same
>> name as the input so that it will be FILENAME.txt. FILENAME can be any
>> name but will be the same for a single merge. I want the batch file to
>> look at the input first name and use it for the output first name. Is this
>> possible? I don't want to edit the batch file each time.
>>
>>
>>
>>
>
>
!