.bak files getting saved into last directory opened

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

.bak files getting saved into last directory opened

Post by gwgs » Mon Mar 26, 2012 12:26 am

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

jussij
Site Admin
Posts: 2429
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Mar 26, 2012 5:52 am

What are the backup settings found in the Options, Editor Options menu, Backup panel :?:

Cheers Jussi

gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Post by gwgs » Mon Mar 26, 2012 11:03 am

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

jussij
Site Admin
Posts: 2429
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Mar 26, 2012 11:50 am

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

gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Post by gwgs » Wed Apr 04, 2012 4:45 am

Thanks Jussi, that works great

gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Post by gwgs » Mon Jul 08, 2013 2:23 am

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

jussij
Site Admin
Posts: 2429
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Jul 08, 2013 3:21 am

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

gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Post by gwgs » Mon Jul 08, 2013 3:34 am

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

jussij
Site Admin
Posts: 2429
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 10, 2013 4:21 am

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

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 4 guests