Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > DOS Command/Batch File/Copy Question

DOS Command/Batch File/Copy Question

Forum Windows XP : Windows XP General Discussion - DOS Command/Batch File/Copy Question

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

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.

Sponsored Links
Register or log in to remove.

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.
>
>
>
>

Reply to Anonymous

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/archive [...] 01075.html
=================================================
"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.
>>
>>
>>
>>
>
>

Reply to Anonymous
- 0 +

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

Reply to john
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > DOS Command/Batch File/Copy Question
Go to:

There are 1125 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them
  • 01:00 vishnuvamp won the Freshman badge
  • 01:00 whiz won the Freshman badge
  • 01:00 jconline won the Uniformed badge
  • 01:00 qiaoda won the Uniformed badge
  • 01:00 sykohedd won the Uniformed badge
  • 01:00 jundja won the Uniformed badge
  • 01:00 cnsftci won the Uniformed badge
  • 01:00 VistaVendetta won the Uniformed badge
  • 01:00 batuchka won the Uniformed badge
  • 01:00 Nick_C won the Uniformed badge