FolderItem error

what i am doing wrong
f = New FolderItem(“Macintosh HD/Users/alexiscolon/Documents/HomeDev/DPF_app/SF_DPF.db”, FolderItem.PathTypeShell)

f=SpecialFolder.Documents.child(“HomeDev”).child(“DPF_app”).child(“SF_DPF.db”)

[quote=177341:@Alexis Colon Lugo]what i am doing wrong
f = New FolderItem(“Macintosh HD/Users/alexiscolon/Documents/HomeDev/DPF_app/SF_DPF.db”, FolderItem.PathTypeShell)[/quote]
Open Terminal
Drop the item into terminal
Copy the path that is shown
Use that

I suspect te actual path is /Users/alexiscolon/Documents/HomeDev/DPF_app/SF_DPF.db

Ok
Thanks

unpack this and move/copy it to username/Library/Services or double click and choose ‘Install’

then you have in the Finder context menu under Services a new entry ‘NativePath’ ,
which copies the NativePath into clipboard - so you can paste it into Xojo

[quote=177472:@Axel Schneider]then you have in the Finder context menu under Services a new entry ‘NativePath’ ,
which copies the NativePath into clipboard - so you can paste it into Xojo[/quote]
This is great!

here is 2 versions that gives you all you need for folderitem
NativePath for Xojo Service

for example
GetFolderItem("/Volumes/Axel_1/AppleScript/KalenderTest.scpt", FolderItem.PathTypeNative)

the version ‘insert NativePath in Xojo’ inserts the string on cursor position in Xojo

for ShellPath

try
	tell application "Finder"
		set strFilePath to (get selection) as text
	end tell
	set strFilePath to quote & POSIX path of strFilePath & quote
	set {strDelimeter, text item delimiters} to {text item delimiters, return}
	set myresult to strFilePath as text
	
	set stringToFind to ":"
	set stringToReplace to "\\\"
	set theContent to myresult
	set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, stringToFind}
	set ti to every text item of theContent
	set AppleScript's text item delimiters to stringToReplace
	set newContent to ti as string
	set AppleScript's text item delimiters to oldTID
	
	set stringToFind to space
	set stringToReplace to "\\\\ "
	set theContent to newContent
	set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, stringToFind}
	set ti to every text item of theContent
	set AppleScript's text item delimiters to stringToReplace
	set newContent to ti as string
	set AppleScript's text item delimiters to oldTID
	
	set stringToFind to "'"
	set stringToReplace to "\\\\'"
	set theContent to newContent
	set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, stringToFind}
	set ti to every text item of theContent
	set AppleScript's text item delimiters to stringToReplace
	set newContent to ti as string
	set AppleScript's text item delimiters to oldTID
	
	set stringToFind to "`"
	set stringToReplace to "\\\\'"
	set theContent to newContent
	set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, stringToFind}
	set ti to every text item of theContent
	set AppleScript's text item delimiters to stringToReplace
	set newContent to ti as string
	set AppleScript's text item delimiters to oldTID
	set newContent to "GetFolderItem(" & newContent & ", FolderItem.PathTypeShell)"
	--display dialog newContent
	set the clipboard to newContent
end try