Do you want to append all the files to gether, if so can there are no other
files in the directory, then open a dos shell window and change directory
(cd) to the folder and try:
copy *.txt totalhours.txt
that should do it.
Otherwise you can write a vba script to copy the files.
--
HTHs Martin
"nickysquawkes" wrote:
I have several a directory of text files that contain the same data but
for different weeks.
E.G.
JANHOURS.txt
FEBHOURS.txt
MARHOURS.txt
APRHOURS.txt
TOTALHOURS.txt
I want to combine all the files ending with hours into totalhours.txt
so it can be loaded into a pivot table. However I need this to be
automatic. I know it can be done using a batch file, but I can't
remeber the batch code to do this. Can anyone help?
Thanks
--
nickysquawkes
------------------------------------------------------------------------
nickysquawkes's Profile: http://www.excelforum.com/member.php...o&userid=30630
View this thread: http://www.excelforum.com/showthread...hreadid=502858