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

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Schuller
Posts: 170
Joined: 02 May 2023 21:08

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

Post 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

highend
Posts: 14230
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post by highend »

Code: Select all

return gettoken(<cc_name>, 2, "$", , 2);
?
One of my scripts helped you out? Please donate via Paypal

Schuller
Posts: 170
Joined: 02 May 2023 21:08

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

Post 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?

highend
Posts: 14230
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post by highend »

<cc_base>
One of my scripts helped you out? Please donate via Paypal

Schuller
Posts: 170
Joined: 02 May 2023 21:08

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

Post by Schuller »

return gettoken(<cc_base>, 2, "$", , 2);

Works perfect, Thanks!

Schuller
Posts: 170
Joined: 02 May 2023 21:08

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

Post 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

highend
Posts: 14230
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post by highend »

Code: Select all

$base = <cc_isfolder> ? <cc_name> : <cc_base>;
    return gettoken($base, 2, "$", , 2);
One of my scripts helped you out? Please donate via Paypal


Post Reply