GetDetailsOf... help please...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack-2

    GetDetailsOf... help please...

    I want show the name of a file, but only the name, without extension. I have
    used this code:

    var fldr = FileList.Folder
    var name;
    // name
    name = fldr.GetDetails Of(items, 0);
    text = "<b>" + name + "</b>";

    This code show the name complete (name.ext), and I want only you the name
    without extension, because the extension is not useful for me in this case.
    I believe that isn´t possible show only the name with the method
    GetDetailsOf, and I need help to made a code that only show the name of
    file, and I prefer that this code not use ActiveX, because these can be a
    problem.

    thanks!


  • Janwillem Borleffs

    #2
    Re: GetDetailsOf... help please...


    "Jack-2" <nada@nada.ne t> schreef in bericht
    news:brv3u6$7ol 2r$1@ID-155475.news.uni-berlin.de...[color=blue]
    > I want show the name of a file, but only the name, without extension. I[/color]
    have[color=blue]
    > used this code:
    >
    > var fldr = FileList.Folder
    > var name;
    > // name
    > name = fldr.GetDetails Of(items, 0);
    > text = "<b>" + name + "</b>";
    >[/color]

    Try:
    name = fldr.GetDetails Of(items, 0);
    name = name.substring( 0, name.lastIndexO f('.'));

    JW



    Comment

    • Jack-2

      #3
      Re: GetDetailsOf... help please...

      thanks!

      "Janwillem Borleffs" <jw@jwscripts.c om> escribió en el mensaje
      news:3fe45863$0 $186$1b62eedf@n ews.wanadoo.nl. ..[color=blue]
      >
      > "Jack-2" <nada@nada.ne t> schreef in bericht
      > news:brv3u6$7ol 2r$1@ID-155475.news.uni-berlin.de...[color=green]
      > > I want show the name of a file, but only the name, without extension. I[/color]
      > have[color=green]
      > > used this code:
      > >
      > > var fldr = FileList.Folder
      > > var name;
      > > // name
      > > name = fldr.GetDetails Of(items, 0);
      > > text = "<b>" + name + "</b>";
      > >[/color]
      >
      > Try:
      > name = fldr.GetDetails Of(items, 0);
      > name = name.substring( 0, name.lastIndexO f('.'));
      >
      > JW
      >
      >
      >[/color]


      Comment

      Working...