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
How to return all characters after ( and before ) in a file name
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to return all characters after ( and before ) in a file name
gettoken() * 2?
One of my scripts helped you out? Please donate via Paypal
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
Re: How to return all characters after ( and before ) in a file name
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
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
-
RalphM
- Posts: 2086
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: How to return all characters after ( and before ) in a file name
I think it is about time for you to make an effort and try to read and make sense of the help file. 
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
Re: How to return all characters after ( and before ) in a file name
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.
Its okay, I'll pass on this sort of assistance. Gotta get back to work.
Last edited by Schuller on 06 Oct 2024 11:36, edited 1 time in total.
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
Re: How to return all characters after ( and before ) in a file name
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
Thanks
-
klownboy
- Posts: 4459
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440
Re: How to return all characters after ( and before ) in a file name
Just what highend stated (gettoken *2) so any donations should go to him.
Code: Select all
return gettoken(gettoken(gpc(,"file"),"2","("),"1",")");You do not have the required permissions to view the files attached to this post.
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
Re: How to return all characters after ( and before ) in a file name
I put exactly:
return gettoken(gettoken(gpc(,"file"),"2","("),"1",")");
and it returns nothing
return gettoken(gettoken(gpc(,"file"),"2","("),"1",")");
and it returns nothing
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to return all characters after ( and before ) in a file name
Code: Select all
return gettoken(gettoken(<cc_base>, 2, "("), 1, ")");One of my scripts helped you out? Please donate via Paypal
-
Schuller
- Posts: 195
- Joined: 02 May 2023 21:08
-
klownboy
- Posts: 4459
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440
Re: How to return all characters after ( and before ) in a file name
Yeah, it worked for me, but I should have used <cc_base> for use in a custom column>. 
XYplorer Beta Club