Hi all,
I wrote a little powershell script to rename a file after it was copied but don`t think Syncovery supports powershell scripts?
Hence the question, anybody have an idea how to achive the renaming in whatever sript langue supported?
All I need is to rename a file called Hig2.hcw to Hig2_[date in ddmmyy format].hcw
Pretty simple really, if you kow how.
or, alternately, how can I get my powershell script to run?
tried just the path & script name, and powershell path & script name, none worked
Tx.
Run script after..
Re: Run script after..
Hello,
ideally, this would be done with a PascalScript like the following. You can enter it in the profile via the PascalScript checkmark on the Job tab sheet.
See also: https://www.syncovery.com/pascalscript
To actually run a Powershell script, you need to use a command line similar to this:
ideally, this would be done with a PascalScript like the following. You can enter it in the profile via the PascalScript checkmark on the Job tab sheet.
See also: https://www.syncovery.com/pascalscript
Code: Select all
function OnReplaceFilenameLeftToRight(const FileName: UnicodeString;
const isFolder: Boolean):UnicodeString;
begin
if isFolder then
Result:=FileName
else
Result:=ChangeFileExt(FileName,'')+'_'+DateTimeToStrWithFormat(Now,'ddmmyy')+ExtractFileExt(FileName);
end;
Code: Select all
PowerShell.exe -Command C:\scripts\test.ps1
Re: Run script after..
Hi,
Thank you, I missed the " -Command " between my powershell and the script.
Will give it a try.
Thanks
Thank you, I missed the " -Command " between my powershell and the script.
Will give it a try.
Thanks