[jawsscripts] Re: Differentiating between file name and a folder name withhin the JAWS scripts

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 28 Feb 2010 02:11:06 -0500

This trick may not work on all Windows versions, but it looks good on
Vista:

int function getPathType(string path)
if !fileExists(path) then
        return ""  ; invalid path
elif fileExists(path+"\\") then
        return "d"  ; directory
endIf
return "f"  ; file
endFunction

On Sat, Feb 27, 2010 at 05:43:52PM -0800, Victor Tsaran wrote:
Hello all,
Anyone knows of a quick way to find out whether an item in question is a 
file or a folder? I believe JAWS scripting language does not provide 
this functionality. Will this have to be done through the system file 
object? If yes, then how?

Thanks,
V

-- 
------------------------------------------------------------------------

Check out my new album on iTunes at
http://ax.itunes.apple.com/us/artist/victor-tsaran/id344507896

------------------------------------------------------------------------
__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: