update filename of images
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
update filename of images
Hi All,
I copy a stack on an other computer (from iMac intel Core Duo OSX 10.5.6 to PowerBook G4 10.4.2)
I watch the filename or images are updated automatically but if the image is in a group my stack keep the old filename.
Do you watch the same ?
Best regards
Jean-Marc
I copy a stack on an other computer (from iMac intel Core Duo OSX 10.5.6 to PowerBook G4 10.4.2)
I watch the filename or images are updated automatically but if the image is in a group my stack keep the old filename.
Do you watch the same ?
Best regards
Jean-Marc
update filename of images
I'm sorry,
i forget i write a script for update filename of a list of images.
Regards
Jean-Marc
i forget i write a script for update filename of a list of images.
Regards
Jean-Marc
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
update filename of images
Hi Shadowslash,
Thank you for support
This script to update a filename work :
All the best
Jean-Marc
Thank you for support
This script to update a filename work :
Code: Select all
function fChgPathNec pFi -- (pFi is the filename to update)
put empty into rfChgPathNec
put "LeNecessaire" into MonSubFol
put the filename of this stack into MyPathS
put the itemdel into myOID
set the itemdel to "/"
put the num of items of MyPathS into nbD
put the num of items of pFi into nbO
put item 1 to nbD-1 of MyPathS into MyPathFolD
put itemOffset(MonSubFol,pFi) into bufOffNec
put item bufOffNec to nbO of pFi into bufPathKeep
set the itemdel to myOID
put MyPathFolD&"/"&bufPathKeep into rfChgPathNec
return rfChgPathNec
end fChgPathNec
Jean-Marc
Hi Jean-Marc
Let me restate your problem (as I understand it). You are trying to change the filenames of image controls in your stack. The function you listed is what you use to produce the new file path & name. This script works, but not if the image is in a group.
Is that correct?
I just called the function listed here, and when I passed it a file path & name, the path returned by your function was invalid (it contained "//" at one place instead of "/").
Bernard
Let me restate your problem (as I understand it). You are trying to change the filenames of image controls in your stack. The function you listed is what you use to produce the new file path & name. This script works, but not if the image is in a group.
Is that correct?
I just called the function listed here, and when I passed it a file path & name, the path returned by your function was invalid (it contained "//" at one place instead of "/").
Bernard
Hi Bernard,
Thank for this feed-back
No. I tested it now and it work also with an image of a group
Maeby it is because you haven't a subfolder "LeNecessaire" in the folder it contains the stack (it define the part of path to keep)
Jean-Marc
Thank for this feed-back
Yes, you understand meLet me restate your problem (as I understand it). You are trying to change the filenames of image controls in your stack
This script works, but not if the image is in a group.
Is that correct?
No. I tested it now and it work also with an image of a group
I dont have a double "/" [/quote]I just called the function listed here, and when I passed it a file path & name, the path returned by your function was invalid (it contained "//" at one place instead of "/").
Maeby it is because you haven't a subfolder "LeNecessaire" in the folder it contains the stack (it define the part of path to keep)
Jean-Marc