Diesel Expressions for file path

Diesel Expressions for file path

ben.williamsMPBQ3
Participant Participant
1,268 Views
2 Replies
Message 1 of 3

Diesel Expressions for file path

ben.williamsMPBQ3
Participant
Participant

Hi all!, 

 

I would like to be able to access file names that are at the end of a file path, however one file name in the middle of the path changes in length. e.g.

 

2019/ 123456 'Name length changes'/Drawings/Mechanical/Preliminary

 

I can get Diesel to get '2019' and '123456' with no problem as the character lengths never change. Is there a way Diesel can count backwards? As the folder names 'Mechanical' & 'Preliminary' don't change in character length.

 

So if there was a way for Diesel to just grab the last two folders, count the folder string characters backwards there would be no change in character length.

 

Any help would be greatly appreciated.

 

 

0 Likes
1,269 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant

DIESEL has very limited functionality. Look HERE at the list of all functions available.

Unless you're on LT rather move to LISP.

0 Likes
Message 3 of 3

ben.williamsMPBQ3
Participant
Participant

Unfortunately I don't quite understand the code, I have been able to manipulate the numbers of characters on

existing codes to get the desired folder name from a path.

 

One code I was using was able to delete the last character of a string, which has made me think can a code count the characters in a file path backwards. If it can, I can get the file names of the last two folders and the fact that a previous folder name changes in length would not affect the last two folder names.

 

Am I making any sense? :s

0 Likes