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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -