Hello everyone
I would need to make a backup job for a folder structure containing different file types where one of them should be changed in the backup location (for example, all .DOC files should be renamed to .BAK). All the other files should be backed up unchanged.
Is that possible?
Regards
Change one filetype on-the-fly
Re: Change one filetype on-the-fly
Hello,
yes, you can do this with a PascalScript.
Please see
https://www.syncovery.com/pascalscript/
In the following example, I chose lower case extensions because that's the standard nowadays. However it will recognize an uppercase .DOC extension too.
The script is pasted into the profile via the checkmark "PascalScript..." on the "Job" tab sheet.
yes, you can do this with a PascalScript.
Please see
https://www.syncovery.com/pascalscript/
In the following example, I chose lower case extensions because that's the standard nowadays. However it will recognize an uppercase .DOC extension too.
Code: Select all
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean):UnicodeString;
begin
if isFolder then
Result:=FileName
else
if LowerCase(ExtractFileExt(FileName))='.doc' then
Result:=ChangeFileExt(FileName,'.bak')
else
Result:=FileName;
end;
-
- Posts: 12
- Joined: Thu Apr 07, 2022 11:49 am
Re: Change one filetype on-the-fly
Hello Tobias, thanks for the quick response
As luck would have it, I need this backup job to run on our backup QNAP NAS (TS-1635AX), with ARM CPU.
And attempting to add Pascal script resulted in "PascalScript is not supported on this CPU type" error message.
I've tested the script on a different, x86 powered, NAS and it works like a charm.
Is there any other way I could accomplish this directly, on the first mentioned NAS?
Thank you for the assistance
Regards
As luck would have it, I need this backup job to run on our backup QNAP NAS (TS-1635AX), with ARM CPU.
And attempting to add Pascal script resulted in "PascalScript is not supported on this CPU type" error message.
I've tested the script on a different, x86 powered, NAS and it works like a charm.
Is there any other way I could accomplish this directly, on the first mentioned NAS?
Thank you for the assistance
Regards
Re: Change one filetype on-the-fly
Hello,
unfortunately, the PascalScript language is currently not available for 64-bit ARM (AArch64).
I hope it can be implemented, possibly in the second half of 2024.
unfortunately, the PascalScript language is currently not available for 64-bit ARM (AArch64).
I hope it can be implemented, possibly in the second half of 2024.
-
- Posts: 12
- Joined: Thu Apr 07, 2022 11:49 am
Re: Change one filetype on-the-fly
Hi,
it's not easy, as the following needs to be translated to 64-bit:
https://github.com/modulo7/pascalscript ... ce/arm.inc
I will try to give it a higher priority. I am actually very interested in this. MacOS customers need it too, although for another good while they can just install the Intel version of Syncovery on their Apple Silicon Macs.
it's not easy, as the following needs to be translated to 64-bit:
https://github.com/modulo7/pascalscript ... ce/arm.inc
I will try to give it a higher priority. I am actually very interested in this. MacOS customers need it too, although for another good while they can just install the Intel version of Syncovery on their Apple Silicon Macs.
-
- Posts: 12
- Joined: Thu Apr 07, 2022 11:49 am
Re: Change one filetype on-the-fly
I'm sure it's not easy (but maybe it was already in preparation or something like that...).tobias wrote: ↑Tue Feb 27, 2024 12:50 pmHi,
it's not easy, as the following needs to be translated to 64-bit:
https://github.com/modulo7/pascalscript ... ce/arm.inc
I will try to give it a higher priority. I am actually very interested in this. MacOS customers need it too, although for another good while they can just install the Intel version of Syncovery on their Apple Silicon Macs.
While we're at this, not that it's problem or anything, are there any Release Notes or What's New for new versions or we just look around & try new stuff?
Haven't been able to find them on your site.
Again, thank you very much Tobias