hibbidiji
asked on
parsing filename from a full path+filename
I am grabbing full paths to files from file input boxes on my web page. I, therefore have path strings like this:
c:\files\music\myfile.mp3
I might also get it in unix like this:
/usr/home/me/music/myfile. mp3
I would like to get a js function that I can pass strings like these and it will determine if it is windows or *nix and will return just the filename itself: 'myfile.mp3'
help!
c:\files\music\myfile.mp3
I might also get it in unix like this:
/usr/home/me/music/myfile.
I would like to get a js function that I can pass strings like these and it will determine if it is windows or *nix and will return just the filename itself: 'myfile.mp3'
help!
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.

ASKER