#11 2022-08-26 22:47

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Moving items....

Stefan wrote:

I was in real looking for to break the script execution for all the rest of the files.
IF (a=1) THEN stop the whole script execution completely, do not continue on the rest of the files.

Sounds like an initialization routine.

var
  Initialized: Boolean;
begin
  if not Initialized then
  begin
    Initialized := True
    // Insert your code here
  end;
end.

There is also the Error procedure, which will stop the whole process and display an error message to the user.

Offline

#12 2022-08-27 17:45

Togolen8
Member
Registered: 2022-08-19
Posts: 9

Re: Moving items....

I love the fact (limitation or not from ReNamer?) the script is copying the files, but not moving them, so I can do more work on them still on the same location for alternative end results. The devs should implement it in the list.
Again thank you for the code.

Offline

#13 2022-08-29 13:45

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Moving items....

den4b wrote:
Stefan wrote:

I was in real looking for to break the script execution for all the rest of the files.
IF (a=1) THEN stop the whole script execution completely, do not continue on the rest of the files.

. . .

There is also the Error procedure, which will stop the whole process and display an error message to the user.


Thank you, that works for me:

begin

if (not WideDirectoryExists(TargetPath)) then
error( ' - Missing TargetPath which must already exist beforehand !' );

//code here

end.

Results in:

Error

Preview process has been terminated due to a
 critical error:

Pascal Script Execute:
[Line 27] Exception: - Missing TargetPath which
 must already exist beforehand !

[OK]


 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB