Grab data between two / in file directory

Started by Franchise, July 17, 2020, 02:37:56 PM

Previous topic - Next topic

Franchise

Hello.  I am trying to get grab the word "Documents" in the following file directory example.  C:\Users\Franchise\Documents\Fishing Pics\

Thanks for the help.

ChuckC

Handle the path as if it were actually a list of string values delimited by the '\' path element separator.  Use the ItemCount() and ItemExtract() functions to pull out the element you want.

td

It depends on what your needs are but you can search and or extract a fold name using the Item* functions.  For example,
Code (winbatch) Select
nIndex = ItemLocate('Documents','C:\Users\Franchise\Documents\Fishing Pics\','\')

strItem = ItemExtract( nIndex, 'C:\Users\Franchise\Documents\Fishing Pics\', '\')
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade