Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Batch Script

Status
Not open for further replies.

phxcoyotes097

Programmer
Feb 19, 2003
16
US
I need help with this one.

I need help creating a batch script to do the following.

1. I have multiple flat files in one windows directory. They are "|" delimited. They all have unique names excpet for the .DAT at the end.

2. I need to create a "master" flat file with a name "YUMINV810.DAT" with all of the information from the multiple files listed in step 1. It needs to remain in the same format. I just need the script to append each record information after the previous one.

3. I need to move the "master" file to a different directory.

4. I need to be able to execute this script. Like an .exe script.

5. Creating it in note or wordpad would be fine.
Thanks for your help.
 
since these are just txt files you can do this fairly easily...

2 files
file 1 contains:
1|file|random data

file 2 contains
2|file|other randomness

in a batch file have this line...
copy file1.dat+file2.dat bigfile.dat

it will then contain
1|file|random data
2|file|other randomness
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top