Im using GetOpenFolderItem to select a specific file type:-
Dim aviType As New FileType
aviType.Name = "video/avi"
aviType.MacType = "AVI"
aviType.MacCreator = "sjs"
aviType.Extensions = "avi"
f = GetOpenFolderItem( aviType )
How do I store the selected folder location as a string?
I tried f.NativePath but it returned the path with the filename.
I tried f.Directory but that seems to be a boolean
DaveS
(DaveS)
December 26, 2016, 3:56pm
2
you want JUST the folder name?
f.displayname
The lang ref is your friend
[quote=305569:@Dave S]you want JUST the folder name?
f.displayname
The lang ref is your friend[/quote]
Hi Dave - That seems to just display the filename
folder name?
Dim f As FolderItem
f = SelectFolder
If f <> Nil Then
MsgBox(f.Name)
End If
Name of the folder holding the item you just selected?
use the parent property
[code]
dim f as New folderitem
f=GetOpenFolderItem( aviType )
if f.parent <> Nil then
MsgBox f.parent.Name
end if[/code]
Maybe Im not explaining this too well…
I need the full path (of the file I have selected) as a string - but not including the filename
eg.
Path to file:
/Users/stuartsykes/Desktop/Films/new.avi …(this quite easy to get using f.NativePath)
But I need the full path eg:
Path to folder:
/Users/stuartsykes/Desktop/Films/
[quote=305574:@Jeff Tullin]folder name?
Dim f As FolderItem
f = SelectFolder
If f <> Nil Then
MsgBox(f.Name)
End If
Name of the folder holding the item you just selected?
use the parent property
[code]
dim f as New folderitem
f=GetOpenFolderItem( aviType )
if f.parent <> Nil then
MsgBox f.parent.Name
end if[/code][/quote]
This does display the folder name but not the full path
Thanks Michel - Thats got it
By the way - just tried out RubberViews - works great - thinking of buying it - any Christmas offers on at the moment
edit… Michel got in there.
also
f.parent.nativepath
f.parent.absolutepath
you have some choices here…
[quote=305582:@Jeff Tullin]edit… Michel got in there.
also
f.parent.nativepath
f.parent.absolutepath
you have some choices here…[/quote]
Thanks Jeff
[quote=305581:@Stuart Sykes]Thanks Michel - Thats got it
By the way - just tried out RubberViews - works great - thinking of buying it - any Christmas offers on at the moment :)[/quote]
Unfortunately, Black Friday week has elapsed. There will be other deals coming