Page 1 of 1

Backup Single File With A Different Name

Posted: 20 Oct 2014 06:33
by aimy
Hi.

Is it possible if I want to backup filename.xml as a filename_SUFFIX.xml:

Code: Select all

"App Settings"
 backupto "D:\SugarSync\Programs\Aimy\filename_S13018.xml","D:\My Programs\filename.xml";
How should I rewrite the command then?

Thanks.

Re: Backup Single File With A Different Name

Posted: 20 Oct 2014 09:23
by FluxTorpedoe
Hi'
You were probably looking for the copyas command.

With your example:

Code: Select all

"App Settings"
  copyas "*_S13018.?", "D:\SugarSync\Programs\Aimy", "D:\My Programs\filename.xml"";

Re: Backup Single File With A Different Name

Posted: 20 Oct 2014 09:25
by highend

Code: Select all

"App Settings"
    copyitem "D:\My Programs\filename.xml", "D:\SugarSync\Programs\Aimy\filename_S13018.xml";

Re: Backup Single File With A Different Name

Posted: 20 Oct 2014 11:04
by PeterH
As aimy explicitely asked for backup, he maybe want to use functionality of it, like not to change attributes as date/time of the file?

Re: Backup Single File With A Different Name

Posted: 20 Nov 2014 05:02
by aimy
Thanks all.

Actually as the name implies, I want to backup only if there is need to.

Well anyway actually in my case, it will be always a replacement. So, both copyas and copyitem will suit my needs I think, thanks.

But how do I set it to overwrite the existing file if I using the copyitem command, anyone?

Thank you.

Re: Backup Single File With A Different Name

Posted: 20 Nov 2014 05:12
by aimy
One more thing, is that possible for the S13018 suffix part, it derived automatically from the current computer name for example?

Code: Select all

 copyitem "D:\My Programs\filename.xml","D:\SugarSync\Programs\Aimy\filename_<computer_id>.xml";
How do I'm gonna achieve that?

Thank you.

Re: Backup Single File With A Different Name

Posted: 20 Nov 2014 11:35
by PeterH
aimy wrote:One more thing, is that possible for the S13018 suffix part, it derived automatically from the current computer name for example?

Code: Select all

 copyitem "D:\My Programs\filename.xml","D:\SugarSync\Programs\Aimy\filename_<computer_id>.xml";
How do I'm gonna achieve that?

Thank you.
Use %computername% for computername. :D

If you could change naming to e.g. "D:\SugarSync\Programs\Aimy\%computername%\filename.xml" :arrow: use the same filename as the origin, you could use Backupto. Advantages:
- you have flags to pre-define reaction On Collision
- dates&times of the file were kept as original

Re: Backup Single File With A Different Name

Posted: 21 Nov 2014 08:12
by aimy
PeterH wrote:Use %computername% for computername. :D

If you could change naming to e.g. "D:\SugarSync\Programs\Aimy\%computername%\filename.xml" :arrow: use the same filename as the origin, you could use Backupto. Advantages:
- you have flags to pre-define reaction On Collision
- dates&times of the file were kept as original
Thanks a lot.

Works like a charm! ;)

Re: Backup Single File With A Different Name

Posted: 21 Nov 2014 10:36
by PeterH
aimy wrote:Thanks a lot.

Works like a charm! ;)
Fine: glad to hear :D