1. WEE - automatic backup of files @startup (initial edit)

I have no shame...

Often I will start editing a file and I feel as though things are coming along swimmingly.. and then I realize that I should have backed up the original file at the time I started editing.

-- in file wee.exw place the following procedure before the global functikon open_file  
procedure create_backup_file_at_startup(sequence file_name) 
    sequence  BFILE = dirname(file_name) & SLASH & filebase(file_name) & "-STARTUP." & fileext(file_name) 
    if copy_file(file_name, BFILE, 1) then end if 
end procedure 
-- 
global function open_file(sequence file_name, integer reload) 
-- 
--   
    create_backup_file_at_startup(file_name)  --<--- insert 
    file_name = canonical_path(file_name, 0, CORRECT) 
-- 
-- 
end function 

It would be just as easy to write something like a routine and make a menu option to "Revert to Start". I suppose

But of course someone who really knew what they were doing could write automatic backup restore routines based on time frequency with time stamps.

Regards, Kenneth Rhodes

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu