string strip

example ) i have C:\Users\Public\Pictures\Sample Pictures\Desert.jpg

i want to extract Desert

is that possible ?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Still not understand.
Are you need to replace "Desert" to ffff-bbbb-cccc?
Show me the resulting string.

barigazy

barigazy's picture

...

Is this that you want

filename = @"C:\Users\Public\Pictures\Sample Pictures\Desert.jpg"
strarr = filterstring filename "\\."
--> result is
--> #("C:", "Users", "Public", "Pictures", "Sample Pictures", "Desert", "jpg")

barigazy

dussla's picture

perpect

are you god ?
you are my god ~~

Rodman's picture

.

Search in the Maxscript documentation "String Values". You will find probably your happiness.

Rodman

barigazy's picture

...

getFilenameFile @"C:\Users\Public\Pictures\Sample Pictures\Desert.jpg"

barigazy

dussla's picture

wow

pls i have one question more .
sorry ~~

aaa*bbb*ccc

i would like to break them

aaa
bbb
ccc

pls how can i that ?

barigazy's picture

...

what is aaa*bbb*ccc?

barigazy

dussla's picture

modify question

there is ffff-bbbb-cccc

i can't use * in file name

a=ffff
b=bbbb
c=cccc

a b c is variable

ffff-bbbb-cccc is name

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.