Page 1 of 1
.bak files getting saved into last directory opened
Posted: Mon Mar 26, 2012 12:26 am
by gwgs
when saving edited files, if you have opened files with the open file dialog, from multiple directories, all the .bak files end up in the last location opened, not in the original file locations of the files being edited.
eg
zeus c:\temp\test.txt d:\temp\test2.txt
open d:\temp2\test3.txt with the file open dialog
save files,
all .bak files are in d:\temp2
Grant
Posted: Mon Mar 26, 2012 5:52 am
by jussij
What are the backup settings found in the
Options, Editor Options menu,
Backup panel
Cheers Jussi
Posted: Mon Mar 26, 2012 11:03 am
by gwgs
Backup Mode: Replace extension with .BAK
Backup Details:
Alternative backup directory: .
Do a periodic file backup every 5 minutes
Skip the backup for files larger than 0 MBytes
Grant
Posted: Mon Mar 26, 2012 11:50 am
by jussij
Alternative backup directory: .
The . character represents the current directory.
With this setting I would expect to see the behaviour you are describing.
Each time you use the file open dialog you will be changing the current directory.
If you want the backup file to appear in the same folder as the file you should use the $fdd macro tag.
Cheers Jussi
Posted: Wed Apr 04, 2012 4:45 am
by gwgs
Thanks Jussi, that works great
Posted: Mon Jul 08, 2013 2:23 am
by gwgs
I am finding that i'm still getting .bak files for open files the the last directory opened, even with the $fdd as the backup path, this is with the 3.97p version and earlier versions.
Thanks
Grant
Posted: Mon Jul 08, 2013 3:21 am
by jussij
Having given this some more thought it is clear the
$fdd will not achieve the result you're after.
The
$fdd represents the drive and directory of the active file so if you save the active file it will work.
But naturally if you use something like the
file save all operation then
$fdd will only represent the drive and directory of what ever is the active file at the time.
To achieve the result you're looking for I suggest adding a
file save as trigger to make the backup in the correct folder.
Here is an example of how this can be done:
http://www.zeusedit.com/zforum/viewtopic.php?t=6911
Cheers Jussi
Posted: Mon Jul 08, 2013 3:34 am
by gwgs
as this is occuring with auto save I guess that is how it is happening.
I'll give the file save trigger a try when I get time.
Thanks
Grant
Posted: Wed Jul 10, 2013 4:21 am
by jussij
I'll give the file save trigger a try when I get time.
I had another look at the
save trigger that I created earlier and it suffers the same issue of using the
$fdd macro tag.
I wrote that macro based on a users request and in my haste to write that macro I resorted using those tags as they are very easy to use.
In any case I took a longer look at that macro and have made changes to it so that it no longer uses the macro tags.
The update macro can be found here:
http://www.zeusedit.com/zforum/viewtopic.php?t=6911
Cheers Jussi