get 4th item in folder path

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sbrady19
Posts: 348
Joined: 12 Apr 2018, 05:22
Location: Central Florida
Contact:

get 4th item in folder path

18 Aug 2022, 10:11

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.
sbrady19
Posts: 348
Joined: 12 Apr 2018, 05:22
Location: Central Florida
Contact:

Re: get 4th item in folder path

18 Aug 2022, 10:16

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%
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: get 4th item in folder path

18 Aug 2022, 10:20

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%

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Mateusz53, MrDoge, peter_ahk and 362 guests