Copy the code below to a file of your own called mysave.e or something - in your slick configuration folder. I added the following lines to the official save_file function.
int result = copy_file(filename, 'H:\slick-backups\' :+ strip_filename(filename,'P'));
if (result != 0) {
_message_box("slick backup main copy failed " :+ (_str)(result));
}
Modify the location you want the file to be copied to. If you want to replicate the directory structure on the server according to where the file comes from then you need to do a bit more work (using make_path). Let me know if you need that. To load the code, open the mysave.e file in slick and use the load module command on the macro menu.
#include "slick.sh"
#pragma option(strictsemicolons,on)
#pragma option(strict,on)
#pragma option(autodecl,off)
#pragma option(strictparens,on)
#import "tagform.e"
/**
* Writes current buffer to filename. This function is a hook function
* that the user may replace. Options allowed by <b>_save_file</b>
* built-in may be specified.
* @param filename parameter should not contain options.
*
* @appliesTo Edit_Window
*
* @categories File_Functions
*
*/
_str save_file(_str filename,_str options)
{
#if 0
int renumber_flags=numbering_options();
if (renumber_flags&VSRENUMBER_AUTO) {
if (renumber_flags&VSRENUMBER_COBOL) {
renumber_lines(1,6,'0',false,true);
}
if (renumber_flags&VSRENUMBER_STD) {
renumber_lines(73,80,'0',false,true);
}
}
#endif
typeless status=_save_file(options " "maybe_quote_filename(filename));
if (!status && file_eq(strip(filename,'B','"'),p_buf_name)) {
//_cbsave_filewatch();
#if 1
call_list('_cbsave_');
//10:51am 7/3/1997
//Dan modified for auto-tagging
if (def_autotag_flags2&AUTOTAG_ON_SAVE) {
//messageNwait(nls('got here'));
TagFileOnSave();
}
#endif
}
int result = copy_file(filename, 'H:\slick-backups\' :+ strip_filename(filename,'P'));
if (result != 0) {
_message_box("slick backup main copy failed " :+ (_str)(result));
}
return(status);
}