combining a large number of random txt files

December 19, 2010 at 17:10:33
Specs: Windows Vista
here's what it looks like


I:\secret\bat\Keys File ______ - o x

5123-txt.txt
354321-txt.txt
r37234-txt.txt
-----------------------------------------------

here's a cmd example command of what i'd like to happen


cmd____________ - o x

cd I:\secret\bat\keys file

type *.txt >> bigfile.txt

---------------------------------

i basically want to get all my text files without knowing there name specifically into one text file


See More: combining a large number of random txt files

Report •


#1
December 19, 2010 at 17:56:59
What's wrong with what you posted?

type *.txt >> bigfile.txt

Works fine... Do you want the files deleted after?

Can I put a question here?


Report •

#2
December 19, 2010 at 18:05:25
phhtttt wow it does work :P well it didn't work before that's why i decided to ask

Report •

#3
December 19, 2010 at 18:06:59
and yes i do want them to delete

Report •

Related Solutions

#4
December 19, 2010 at 18:23:39
FOR /f "tokens=*" %%a IN ('DIR /b "*.txt"') DO (
TYPE "%%a">>NewFile.txt
DEL "%%a"
)

Can I put a question here?


Report •

#5
December 19, 2010 at 18:40:51
ty for the code but importantly what does the code do. i don't want to add it until i know what it is doing with my txt files

Report •

#6
December 19, 2010 at 19:12:03
FOR /f "tokens=*" %%a IN ('DIR /b "*.txt"') DO (

Loops through all the text files in the current directory, setting the current one as a variable (%a).

TYPE "%%a">>NewFile.txt

You know what this does.

DEL "%%a"
)

Deletes the file, and ends the loop.

If you want to double check, use this:

FOR /f "tokens=*" %%a IN ('DIR /b "*.txt"') DO (
TYPE "%%a">>NewFile.txt
ECHO DEL "%%a"
)

And it won't actually delete the files.

Can I put a question here?


Report •

#7
December 19, 2010 at 21:40:56
thanks for the second command should've came up with that idea b4, but yeah my dictionary is really big and i don't want it disappearing on me

Report •

Ask Question