ULTRAEDIT – Clear Open Files Macro

Good way to clear down all open files and make them empty.  This is useful when cleaning files taken for a replication snapshot from SQL to Oracle (as the idx, sch and pre files are not needed)

Create a new macro in UltraEdit and modify it to contain the following commands:

InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
PlayMacro 1 "ClearOpenFiles"
"MacroFirstFileMarker"
NextWindow
Loop
PlayMacro 1 "ClearOpenFiles"
NextWindow
Top
Find MatchCase "MacroFirstFileMarker"
IfFound
Delete
SaveAll
ExitLoop
EndIf
EndLoop

Save the Macro.

Next time a cleanup of files is needed, load the files into Ultraedit and run the macro. It will loop through all the files until it gets back to the first one.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: