javascript - Grunt Task - Get Filename from path without extension -


Is it possible to get filename without extension from SRT file path I

as an example Suppose that the src file is my file - the images are located on / my-file.png

In my work this is the time:

  var processname = options.processName || Function (name) {return name; }; Var filename = Process name (file path);   

When he references, <<>

I Without the path and without extension, I want to return the actual file name:

my-file.png

How can I achieve it Can i

may be very old but if someone else finds it then Comment of User3143218: The last 4 characters will be removed from the name of the piece (0, -4), so for example my-file.png we get my-file but Script.js for us we'll get scrip I suggest removing everything from the last point and using a regex.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -