GetDetailsOf... help please...

J

Jack-2

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.GetDetailsOf(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!
 
J

Janwillem Borleffs

Jack-2 said:
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.GetDetailsOf(items, 0);
text = "<b>" + name + "</b>";

Try:
name = fldr.GetDetailsOf(items, 0);
name = name.substring(0, name.lastIndexOf('.'));

JW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top