Computer Hope

Microsoft => Microsoft DOS => Topic started by: Ne$$ on March 27, 2008, 07:20:14 AM

Title: Need help with 2 batch files
Post by: Ne$$ on March 27, 2008, 07:20:14 AM
Ok, I need to make 2 batch files in DOS, and I'm not really handy with DOS, so if you could help me out...

The first one: A batch who merges the content of 2 .txt files, into a new .txt file, and then saves it into a specific  directory (if the directory already exists, the batch stops), and then it sorts the content of the new file (A-Z), and then it saves that into a new .txt. And the file paths have to be entered when you open the batch.

The second: A batch who merges the content of all specified .txt files into a new .txt file, and saves it to a specific directory (if it already exits, stop). The file paths have to be entered when you open the batch.

It's complicated (I think), tnx

Title: Re: Need help with 2 batch files
Post by: devcom on March 27, 2008, 07:57:25 AM
i think you should lern somethink about COPY SET (SORT?) and IF command
Title: Re: Need help with 2 batch files
Post by: blastman on March 27, 2008, 10:51:39 AM
if you have some UNIX tools installed, 'sed' and 'cut' would do nicely here.