Page 1 of 1

get 4th item in folder path

Posted: 18 Aug 2022, 10:11
by sbrady19
here is the path to an open folder.

\\server.xxx.local\Features1\ATP\ATP197 Beggarly, Rusty\EXPORTS

I need to extract item 4: ATP197 Beggarly, Rusty

how do i do this. Thanks.

Re: get 4th item in folder path

Posted: 18 Aug 2022, 10:16
by sbrady19
I got this to work

Code: Select all

{
	StringSplit, word, clipboard , \
	{
	Audio_Folder = \\%word3%\%word4%\%word5%\%word6%\Nuendo Project\%word6% NPR\Audio
	merge_folder = \\%word3%\%word4%\%word5%\%word6%\Nuendo Project\%word6% NPR\Audio\merge
	}
}
msgbox %merge_folder%

Re: get 4th item in folder path

Posted: 18 Aug 2022, 10:20
by mikeyww
Or:

Code: Select all

Clipboard = \\server.xxx.local\Features1\ATP\ATP197 Beggarly, Rusty\EXPORTS
Sleep, 100
; ------------------------
b := "\", word := StrSplit(Trim(Clipboard, b), b)
MsgBox, 64, Fourth item, % word.4
merge_folder := b b word.2 b word.3 b word.4 b word.5 "\Nuendo Project\" word.5 "\NPR\Audio\merge"
MsgBox, 64, Merge folder, %merge_folder%