name dupfile; currentfile = qedit.activefile; connectionname = currentfile.connectionname; duplicate = newfile(connection: connectionname, recordlength: currentfile.recordlength -- qeditLanguage: currentfile.language (Unimplemented Property) ); selection = currentfile.selection; currentfile.select(startline: 1, endline: currentfile.linecount); currentfile.copy(); duplicate.paste(); currentfile.select(range: selection); -- reset selection << Author: bgreen@robelle.com Date: Sept 20, 1999 Web: copy02.qsl Comments: 1. dupfile makes a copy of the currently active file. 2. The duplicate should be on the same host connection, or local. 3. dupfile saves and resets your current selection, which is good scripting practice. 4. Dupfile retains the maximum RecordLength of the file, but cannot do the same for the QeditLanguage attribute, since that is not currently a support Document Property. >>