Feature request - overwrite option

Moderator: Project members

Post Reply
Message
Author
william_d
504 Command not implemented
Posts: 7
Joined: 2010-07-03 15:11
First name: William
Last name: d

Feature request - overwrite option

#1 Post by william_d » 2010-07-03 15:22

Hi,

I am a very new fan of FZ.

Request:
In the overwriting options for existing files could there be a new one called:
"Overwrite if source older"

Many Thanks,

william_d
504 Command not implemented
Posts: 7
Joined: 2010-07-03 15:11
First name: William
Last name: d

Re: Feature request - overwrite option

#2 Post by william_d » 2010-07-04 12:53

feature would need to compensate for non MFMT servers though. ie by deleteing then uploading.

ryand85

Re: Feature request - overwrite option

#3 Post by ryand85 » 2010-07-07 10:01

Good idea. However I think it should have a prompt asking you to confirm before you override and deleting the older files, just to prevent those accidental overrides.

william_d
504 Command not implemented
Posts: 7
Joined: 2010-07-03 15:11
First name: William
Last name: d

Re: Feature request - overwrite option

#4 Post by william_d » 2010-07-07 17:17

not sure if you have used FZ before, but a propmt at every conflict is already built in.

william_d
504 Command not implemented
Posts: 7
Joined: 2010-07-03 15:11
First name: William
Last name: d

Re: Feature request - overwrite option

#5 Post by william_d » 2010-07-11 11:44

I have add the feature (as outlined in orininal post) to my copy (as Action8), and it seems to work fine in scp mode. I just wish the ftp server here http://www.evohosting.co.uk supported MFMT, but hosting provider will not change it. :cry:

Many Thanks for the exellent build instructions:
http://wiki.filezilla-project.org/Compi ... er_Windows

grapan
500 Command not understood
Posts: 1
Joined: 2010-07-19 06:28
First name: Mihai
Last name: Grapan

Re: Feature request - overwrite option

#6 Post by grapan » 2010-07-19 06:35

william_d wrote:Hi,

I am a very new fan of FZ.

Request:
In the overwriting options for existing files could there be a new one called:
"Overwrite if source older"

Many Thanks,
If find this feature request very useful.

CliffordBass
500 Command not understood
Posts: 1
Joined: 2013-09-02 15:55
First name: Clifford
Last name: Bass

Re: Feature request - overwrite option

#7 Post by CliffordBass » 2013-09-02 16:07

Hello Folks,

I would like to add my support to this request. Because of timezone differences when certain files were copied and how they were copied at some point in the past, there are times when I wish to go with the "older" version and it can be a pain to have to look at all the dates/times of the files that have different dates/times and click the OK button for each of thousands of files.

Thanks for your consideration.

And thanks for your product. It is really nice and has made my life easier since I switched to using it.

Clifford Bass

william_d
504 Command not implemented
Posts: 7
Joined: 2010-07-03 15:11
First name: William
Last name: d

Re: Feature request - overwrite option

#8 Post by william_d » 2013-09-02 21:10

here is how to add function your self - though I am not sure these are the entire instructions.


I added to: filezilla-3.3.3\src\engine\ControlSocket.cpp
after this case: case CFileExistsNotification::overwriteSizeOrNewer:

Code: Select all

	case CFileExistsNotification::overwriteOlder:
		if (!pFileExistsNotification->localTime.IsValid() || !pFileExistsNotification->remoteTime.IsValid())
			SendNextCommand();
		else if (pFileExistsNotification->download && pFileExistsNotification->remoteTime.IsEarlierThan(pFileExistsNotification->localTime))
			SendNextCommand();
		else if (!pFileExistsNotification->download && pFileExistsNotification->remoteTime.IsLaterThan(pFileExistsNotification->localTime))
			SendNextCommand();
		else
		{
			if (pData->download)
			{
				wxString filename = pData->remotePath.FormatFilename(pData->remoteFile);
				LogMessage(Status, _("Skipping download of %s"), filename.c_str());
			}
			else
			{
				LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str());
			}
			ResetOperation(FZ_REPLY_OK);
		}
		break;
and added to: filezilla-3.3.3\src\include\notification.h
after: overwriteSizeOrNewer, // Overwrite if source file is different in size or newer than target file

Code: Select all

overwriteOlder,	// Overwrite if source file is older than target file
and added to: filezilla-3.3.3\src\interface\fileexistsdlg.cpp
after: m_action = CFileExistsNotification::overwriteSize;

Code: Select all

	else if (m_pAction8 && m_pAction8->GetValue())
		m_action = CFileExistsNotification::overwriteOlder;
change in: filezilla-3.3.3\src\interface\fileexistsdlg.h
the following line: wxRadioButton *m_pAction1, *m_pAction2, *m_pAction3, *m_pAction4, *m_pAction5, *m_pAction6, *m_pAction7;
to

Code: Select all

	wxRadioButton *m_pAction1, *m_pAction2, *m_pAction3, *m_pAction4, *m_pAction5, *m_pAction6, *m_pAction7, *m_pAction8;

and add to: filezilla-3.3.3\src\interface\resources\dialogs.xrc

Code: Select all

                  <object class="sizeritem">
                    <flag>wxLEFT|wxRIGHT|wxTOP</flag>
                    <border>5</border>
                    <object class="wxRadioButton" name="ID_ACTION8">
                      <label>Overwrite &if source older</label>
                      <value>0</value>
                    </object>
                  </object>
and add to: filezilla-3.3.3\src\interface\resources\settings.xrc
within <object class="wxChoice" name="ID_DOWNLOAD_ACTION">

Code: Select all

                    <item>Overwrite file if source file older</item>

Post Reply