Appending text files

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Appending text files

Postby BenE » Thu Jul 22, 2004 1:21 am

Does Ultraedit have the capability to append (eg. "all open files")? I have looked, but can't see it - altho I don't think I have the latest version currently installed...

Alternatively, does anyone know where I can get a free little app to do it?
User avatar
BenE
Newbie
 
Posts: 1
Joined: Sun Jul 18, 2004 11:00 pm

Re: Appending text files

Postby Mofi » Fri Jul 30, 2004 7:48 am

You can append files with good old dos command copy. Open a command prompt (Run cmd) and enter

copy file1.txt+file2.txt+file3.txt destination.txt

or this example with wildcards

copy file?.txt destination.txt

Enter copy /? for details what copy can do for you.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4062
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Appending text files

Postby vsinceac » Fri Nov 26, 2004 5:06 pm

Copy doesn't work well with text files with unicode charset encoded in UTF-8 (I'd tried all command parameters /b etx...). I also tried cat on linux, it also doesn't work well... I hoped UltraEdit would have some trick to correctly do this kind of task... Does someone have an idea about merging unicode text files encoded in UTF-8?
User avatar
vsinceac
Newbie
 
Posts: 1
Joined: Fri Nov 26, 2004 12:00 am

Re: Appending text files

Postby Mofi » Sat Nov 27, 2004 6:11 am

This macro copies and appends all open files to a new file. Be carefull, the append sequence is defined by the window history queue.

InsertMode
ColumnModeOff
HexOff
UnixReOff
NewFile
"This is the new target file !!!!!!!!!!"
Loop
NextWindow
Top
Find MatchCase "This is the new target file !!!!!!!!!!"
IfNotFound
SelectAll
StartSelect
Copy
EndSelect
CloseFile
PreviousWindow
Paste
Else
Delete
ExitLoop
EndIf
EndLoop
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4062
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Custom User Tools/Tool Configuration