Topic: Consolidating Files In A Directory (1 of 4), Read 71 times
Conf: VEDIT Macro Library
From: Adam Suber
Date: Thursday, August 03, 2000 09:31 AM

Are there any macros out there to order a bunch of files in a directory by date in an ascending order then consolidate all the files into one big file with the lines going from oldest to newest.

 


Topic: Re: Consolidating Files In A Directory (2 of 4), Read 38 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, January 16, 2002 01:33 PM

>I looked for this macro and could not find it. Did you move it =somewhere else?

Here it is (as attachment).


Christian

 
FILEMERGE.VDM (1KB)

 


Topic: Consolidating Files In A Directory (3 of 4), Read 43 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Tuesday, January 29, 2002 11:17 AM

On 1/16/2002 1:21:00 PM, Guy Harrison wrote:
>
>The ability to combine a group
>of files into a single file
>would save me untold hours of
>work. I use VEDIT to convert
>and combine dozens of similar
>(identically structured) but
>separate data files so that I
>can clean and convert them for
>use in another database

Why don't you just use the DOS command
copy /b file1+file2 newfile

I have sometimes downloaded some MPEG files that have been splitted in several dozens of parts. The parts are usually named something like MOVIE.MPG.001, MOVIE.MPG.002 etc.
To combine these, just type

copy /b movie.mpg.001 movie.mpg
copy /b movie.mpg+movie.mpg.002

Now just press cursor up and edit the "002" into "003" and press enter, and so on. It takes approximately one second to do that, to combine one part. Combining 30 parts into one file would thus take about 30 seconds.

-- Pauli

 


Topic: Re: Consolidating Files In A Directory (4 of 4), Read 46 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Tuesday, January 29, 2002 02:59 PM

> Why don't you just use the DOS command
> copy /b file1+file2 newfile

Or you could create a file list with the DOS command, e.g.
"dir *.txt > filelist.txt" and edit it so that only the file
names are left. Than you could Vedit have read the single
file names and write the files to a file "consolidate.txt", e.g.:

File_Open("c:\lva\uk\consol.txt")
#80=BufNum

File_Open("c:\lva\uk\filelist.txt")
#81=BufNum

Reg_Set(11,PATHONLY)
while(!at_eof){
BOL()
RC(10,1)
line(1)

Buf_switch(#80)
Ins_File("|@(11)\|@(10)")
EOF()
BUF_Switch(#81)
}

Fritz

Dr. Friedrich Heberlein, Akad. Direktor
Seminar f. Klassische Philologie,
KU Eichstaett-Ingolstadt / Bayern
D-85071 Eichstaett
Tel. +49 8421 931544 / 933544
Fax +49 93 2544
Email sla019@...
http://www..../SLF/Klassphil/home.htm