saved batch can no longer be changed

Post Reply
Ralf
Posts: 102
Joined: 19 Jan 19 14:37

saved batch can no longer be changed

Post by Ralf » 20 Jul 21 15:59

I've put together a batch

1. I create a batch
08-batch.jpg
08-batch.jpg (3.23 KiB) Viewed 215 times
2. under "rename file" is a script that I have saved
09.ok.jpg
09.ok.jpg (6.07 KiB) Viewed 215 times
3. run works
4. I open the batch so everything is messed up and it can no longer be changed
10-not_ok.jpg
10-not_ok.jpg (15.11 KiB) Viewed 215 times

my script is:

Code: Select all

 
  a: = ''
  a: = '% xmp: photoshop: headline'
  if a <> '' then
   result: = 'E: \ Testbilder \% FileFoldername {mid = 1,3} x \% YYYY \% mm \% yyyy% mm% dd-% xmp: photoshop: headline \% yyyy% mm% dd-% hh% nn% ss.% FileExtension '
  else
    result: = 'no headline available';
 


:?: I have two questions :?:
1. What am I doing wrong
2. How can I display a message box if the field is not filled?

My Version is 6.3.0.3808
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Ralf
Posts: 102
Joined: 19 Jan 19 14:37

Re: saved batch can no longer be changed

Post by Ralf » 22 Jul 21 8:41

I have to ask again here, does anyone else have the problem that when a batch is saved it becomes very confusing and no longer works
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Hert
Posts: 6890
Joined: 13 Sep 03 7:24

Re: saved batch can no longer be changed

Post by Hert » 22 Jul 21 10:08

Use this instead:

Code: Select all

  a := '%xmp:photoshop:headline{encode=quotes}';
  if a <> '' then
    result := 'E:\Testbilder\%FileFolderName{mid=1,3;encode=quotes}x\%YYYY\%mm\%yyyy%mm%dd-%xmp:photoshop:headline{encode=quotes}\%yyyy%mm%dd-%hh%nn%ss' + ImageItem.FileNameExtension
  else
    result := 'no headline available';
This also takes care of errors when there are quotes in the existing photoshop:headline text.
2. How can I display a message box if the field is not filled?
A rename operation is not the way to detect if the field is filled or not.
You do a rename operation with a rename rule that generates 'no headline available' as the file name to use, and that is what PSU will use to rename the file.
This is a user-to-user forum. If you need product support then please send a message

Ralf
Posts: 102
Joined: 19 Jan 19 14:37

Re: saved batch can no longer be changed

Post by Ralf » 22 Jul 21 13:11

thank you, that works fine, but the "Rename file" window is completely dismantled after saving. A second time you can then no longer change or use it.
01.not-ok.jpg
01.not-ok.jpg (14.65 KiB) Viewed 138 times
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Hert
Posts: 6890
Joined: 13 Sep 03 7:24

Re: saved batch can no longer be changed

Post by Hert » 22 Jul 21 13:16

After changing the script with the code I sent you, you should also re-save the batch so that the change is saved.
This is a user-to-user forum. If you need product support then please send a message

Ralf
Posts: 102
Joined: 19 Jan 19 14:37

Re: saved batch can no longer be changed

Post by Ralf » 22 Jul 21 13:43

I think I'm doing something generally wrong in my attempts at a script
if i take your code it works, i take another one always this error comes out of the window above.

here the script adjusts something so as not to run into the error of the field.
sorry if I act too stupid;)

Code: Select all

b :='%FileFoldername{mid=1,2}';
	
 if b > 19 then
  result := 'E:\Testbilder\%FileFoldername{mid=1,2}\%YYYY\%mm\%FileFoldername\'  + ImageItem.FileNameExtension;
 else 
   result := 'wrong directory';	  
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Hert
Posts: 6890
Joined: 13 Sep 03 7:24

Re: saved batch can no longer be changed

Post by Hert » 22 Jul 21 14:53

Code: Select all

var
  f, b: WideString;
begin
  f := '%FileFolderName{encode=quotes}';
  b := MidStr(f, 1, 2);
	
  result := 'wrong directory';	
  if IsValidIntNumberString(b, False) then
  begin
    if StrToInt(b) > 19 then
      result := 'E:\Testbilder\' + b + '\%YYYY\%mm\' + f + '\' + ImageItem.FileNameExtension
  end;
end;
This is a user-to-user forum. If you need product support then please send a message

Ralf
Posts: 102
Joined: 19 Jan 19 14:37

Re: saved batch can no longer be changed

Post by Ralf » 27 Jul 21 17:27

:D wow, once again great, works perfectly ... thank you very much that made my workflow a lot easier. :D
Ralf
---------------------------------------------------------------------------------
Hobby photographer with many pictures (> 100000) of the family over generations.
(Excuse my english)

Post Reply