Long FileName Solution!
Sivakatirswami
katir at hindu.org
Sun Jul 2 05:37:43 EDT 2006
Aloha, Ken:
You are a gem, and this is gold... it solves many challenges for me
across a dozen contexts. The filename hash occurs on the drop, but
once unencrypted the rename command does not touch it. Marvelous...
Thanks!
on dragEnter
set the acceptDrop to true
end dragEnter
on dragDrop
put dragData["files"] into pPath
put stsLongFilePath(pPath) into pPath
set the itemdel to "/"
put item -1 of pPath into tFileName
rename pPath to ("/Users/katir/Desktop/taka-audio transcripts/
loaded to dBase but not on TAKA/" & tFileName)
#Yes! full file name in the new directory....
end dragDrop
On Jul 01, 2006, at 10:03 AM, Ken Ray wrote:
>> Ok the problem of long file names on the Mac not working in
>> Revolution continues to "bite me" at every turn... Here's the latest.
>
> I'm not sure if this is what you're looking for, but the following
> function
> takes a hashed shortened file name and returns the full long name
> to it
> using AppleScript:
>
> function stsLongFilePath pPath
> switch (the platform)
> case "MacOS" -- assumes OS X
> put "set tPath to" && quote & pPath & quote & cr & \
> "set tPath to (POSIX file tPath) as string" & cr & \
> "POSIX path of tPath" into tScript
> do tScript as "AppleScript"
> return (char 2 to -2 of the result) -- strips quotes
> break
> case "Win32"
> return the longFilePath of pPath
> break
> end switch
> end stsLongFilePath
>
> So if you did a drag-and-drop operation and the path is hashed, you
> could
> run it through stsLongFilePath to get the full path name.
>
> Perhaps some variation of this will work for you...
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list