How to get the file name from a full path using JavaScript

0 votes
Is there a way that I can get the last value (based on the '\' symbol) from a full path?

Example:

C:\Documents and Settings\img\recycled log.jpg

With this case, I just want to get recycled log.jpg from the full path in JavaScript.
Sep 2, 2020 in Java-Script by kartik
• 37,520 points
• 3,416 views

1 answer to this question.