Page 1 of 1

How to return all characters after ( and before ) in a file name

Posted: 04 Oct 2024 22:14
by Schuller
Hi ,

I'm trying to return all the characters after ( and before ) 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 ( and before ) in a file name

Posted: 05 Oct 2024 03:03
by highend
gettoken() * 2?

Re: How to return all characters after ( and before ) in a file name

Posted: 05 Oct 2024 09:16
by Schuller
If my file name is this:
2024-09-19(209CT-209Hydro&Water) $842.28

What exactly do I write in the script area of the custom column configuration to return exactly this into a custom column:
209CT-209Hydro&Water

Re: How to return all characters after ( and before ) in a file name

Posted: 05 Oct 2024 10:59
by RalphM
I think it is about time for you to make an effort and try to read and make sense of the help file. :whistle:

Re: How to return all characters after ( and before ) in a file name

Posted: 05 Oct 2024 11:08
by Schuller
Trust me, I've spend an enormous amount of time and effort in the help file and more time managing the file manager than getting work done.
Its okay, I'll pass on this sort of assistance. Gotta get back to work.

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 11:36
by Schuller
If anyone else comes across this post and has the exact syntax to return what I'm seeking for then please respond with it and please include a donation option and I'll be sure to donate.

Thanks

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 12:12
by klownboy
Just what highend stated (gettoken *2) so any donations should go to him.

Code: Select all

return gettoken(gettoken(gpc(,"file"),"2","("),"1",")");
Configure Custom Column.jpg

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 12:29
by Schuller
I put exactly:

return gettoken(gettoken(gpc(,"file"),"2","("),"1",")");

and it returns nothing

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 13:40
by highend

Code: Select all

return gettoken(gettoken(<cc_base>, 2, "("), 1, ")");
^^

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 13:55
by Schuller
Thank you!

Re: How to return all characters after ( and before ) in a file name

Posted: 06 Oct 2024 14:51
by klownboy
Yeah, it worked for me, but I should have used <cc_base> for use in a custom column>. :whistle: