Macro function File.getName(path)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Macro function File.getName(path)

Gabriel Landini
Hi,

I don't understand what the File.getName(path) function does.
It says in the help page:

   File.getName(path) - Returns the name of the specified file or directory.

but the path or file should already be known (otherwise how does one call this
function?).
Obviously I am missing something...

Thanks,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Macro function File.getName(path)

Wayne Rasband
> I don't understand what the File.getName(path) function does.
> It says in the help page:
>
>    File.getName(path) - Returns the name of the specified file or
> directory.
>
> but the path or file should already be known (otherwise
> how does one call this function?).
> Obviously I am missing something...

Given a full path name, for example

     "/Users/wayne/Images/Dicom/Abdo.dcm"

it returns just the file name, in this case

      "Abdo.dcm"

-wayne