Page 1 of 1

How to return all characters after a $ in a file name into a custom column

Posted: 04 Oct 2024 11:18
by Schuller
Hi ,

I'm trying to return all the characters after a $ in a file name into a custom column.
Can anyone please let me know the script for this.

Thanks

Re: How to return all characters after a $ in a file name into a custom column

Posted: 04 Oct 2024 13:41
by highend

Code: Select all

return gettoken(<cc_name>, 2, "$", , 2);
?

Re: How to return all characters after a $ in a file name into a custom column

Posted: 04 Oct 2024 13:58
by Schuller
I should have probably added that I don't want the file extension to be included on the return.
How to exclude that?

Re: How to return all characters after a $ in a file name into a custom column

Posted: 04 Oct 2024 14:00
by highend
<cc_base>

Re: How to return all characters after a $ in a file name into a custom column

Posted: 04 Oct 2024 14:05
by Schuller
return gettoken(<cc_base>, 2, "$", , 2);

Works perfect, Thanks!

Re: How to return all characters after a $ in a file name into a custom column

Posted: 14 Feb 2025 17:26
by Schuller
return gettoken(<cc_base>, 2, "$", , 2);

How do I return everything after the dollar sign for files and folders? I selected files and folders in item type for the above but on folders it only returns everything after $ up to the decimal. Ex. $628.25 will return 628 on folders in the custom column

Re: How to return all characters after a $ in a file name into a custom column

Posted: 14 Feb 2025 18:11
by highend

Code: Select all

$base = <cc_isfolder> ? <cc_name> : <cc_base>;
    return gettoken($base, 2, "$", , 2);

Re: How to return all characters after a $ in a file name into a custom column

Posted: 14 Feb 2025 18:19
by Schuller
Thx