- September 6, 2008 at 9:36 pm #6181jadde29Participant
I have tried to create a macro which cut the file name in the whole path string
Maybe example makes things clear
I have a string which is the whole path to the file like:
I need a macro which can cut the last part of the string leaving only the path like that:
Of course, the length of the name of the file is unknown.
I’ve tried to find a solution but still no clue how it can be done.
Please help gurus, I need it badly
Thanx for your timeSeptember 7, 2008 at 3:35 am #6184yorkaneMember
var fullFileName = ‘C:folder_1folder_2myfile.ext’;
var i = fullFileName.lastIndexOf(”) +1;
var path = fullFileName.substring(0,i);
alert(path);September 7, 2008 at 1:53 pm #6185jadde29Participant
Great thanx yorkane
Just two questions:
Can the result be saved or copied to the clipboard instead of pop-up window?
Can it be more universal-I mean when the path is different or when the text file contains many path strings?
Once again, great thanx for the responce
- You must be logged in to reply to this topic.