Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: looi on March 20, 2019, 01:36:36 PM

Title: get File Name From Path[SOLVED]
Post by: looi on March 20, 2019, 01:36:36 PM
Hello!

One request: an action to obtain a filename from a path. I think it should be easy, but I can't do it.

It may use the GetFileName function https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getfilename?redirectedfrom=MSDN&view=netframework-4.7.2#System_IO_Path_GetFileName_System_String_ (https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getfilename?redirectedfrom=MSDN&view=netframework-4.7.2#System_IO_Path_GetFileName_System_String_)

Code: [Select]
string onlyFileName = System.IO.Path.GetFileName(entirePath);
someone? :D
Title: Re: get File Name From Path
Post by: jeanfabre on March 29, 2019, 04:16:31 AM
Hi,

 I made a new action called GetFilenameFromPath, you can get it on the Ecosystem.

 it will give you the filename, and/or the name itself and/or the extension.

Let me know if it's ok for you,

 Bye,

 Jean
Title: Re: get File Name From Path
Post by: looi on June 06, 2019, 01:46:06 PM
It works great. Thank you Jean! :)