= V5 MultiLine NoSorting TabWidth=30 H=";Edit Binary Files" Allows conversion of a binary file to ASCII with escaped characters for editing and conversion back to binary.^p First open a binary file, then use the BINARY->ASCII clip. After editing is complete use the ASCII->BINARY clip to convert the file back to binary. (The original binary file is saved as NAME.sav and the ASCII verion of the edited file is saved as NAME.xxx -- both can be deleted.)^p Currently Paths or FileNames with spaces are NOT supported. H=BINARY -> ASCII w/Escapes ^!SET %OrigPath%=^## ^!SET %EditPath%=^%OrigPath%.xxx ^!SET %SaveFile%=^$GetName(^##)$^$GetExt(^##)$.sav ^!SET %SavePath%=^%OrigPath%.sav ^!IfFileExist ^%EditPath% EditEXISTS ELSE EditCREATE :EditEXISTS ^!Sound SystemExclamation ^!Continue WARNING: ^%EditPath% ALREADY EXISTS.^%nl%OK to overwrite? :EditCREATE ^!IfFileExist ^%SavePath% SaveEXISTS ELSE SaveCREATE :SaveEXISTS ^!Sound SystemExclamation ^!Continue WARNING: ^%SavePath% ALREADY EXISTS.^%nl%OK to overwrite? ^!dos erase ^%SavePath% :SaveCREATE ^!Close ^!delay 2 ^!ttin ^%OrigPath% -o ^%EditPath% ^!WAIT ^!dos rename ^%OrigPath% ^%SaveFile% ^!WAIT ^!Open ^%EditPath% ^!FocusDoc H=ASCII -> BINARY ^!SET %EditPath%=^## ^!SET %OrigPath%=^$GetPath(^##)$^$GetName(^##)$ ^!SET %EditExt%=^$GetExt(^##)$ ^!If ^%EditExt% <> ".xxx" ExtBAD ELSE ExtOK :ExtBAD ^!Continue "Extension of the ASCII file w/Escapes must be .xxx" ^!goto EXIT :ExtOK ^!IfFileExist ^%OrigPath% OrigEXISTS ELSE OrigCREATE :OrigEXISTS ^!Sound SystemExclamation ^!Continue WARNING: ^%OrigPath% ALREADY EXISTS.^%nl%OK to overwrite? :OrigCREATE ^!SAVE ^!ttout ^%EditPath% -o ^%OrigPath% ^!WAIT ^!CLOSE ^!DeleteFile ^%EditPath% ^!FocusDoc :EXIT