= V5 MultiLine NoSorting TabWidth=30 H="Backup--> .BAK.ext" ; Modifications by Wren McMains to a clip started by Carl Swan ; First set the path/filename of the backup file. ; The backup name for abcd.txt would be abcd.BAK.txt ^!SET %DocPath%=^$GetPath(^**)$^$GetName(^**)$.BAK^$GetExt(^**)$ ; Remember which document you were in, so you can get back here ^!SET %DocIndex%=^$GetDocIndex$ ; Warn the user if the backup file already exists ^!IfFileExist ^%DocPath% EXISTS ELSE NEWFILE :EXISTS ^!Sound SystemExclamation ^!Info WARNING: ^%DocPath% ALREADY EXISTS.^pTherefore, be careful how you answer the next question. :NEWFILE ; Ask the user before actually creating the file ^!Sound SystemQuestion ^!CONTINUE:OK to create backup: ^%DocPath% ^!TOOLBAR COPY ALL ; Copy all the text to the clipboard, paste into a new document ^!ToolBar New Document ^!KEYBOARD CTRL+V ; Save the new document as the backup file, the close new document ^!Save As ^%DocPath% ^!TOOLBAR Close Document ; Return to the document which was active when we started ^!SetDocIndex ^%DocIndex% ; The FocusDoc is probably not necessary, since the focus is already there ^!FocusDoc