playMaker

Author Topic: get File Name From Path[SOLVED]  (Read 863 times)

looi

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
get File Name From Path[SOLVED]
« on: March 20, 2019, 10:36:36 AM »
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_

Code: [Select]
string onlyFileName = System.IO.Path.GetFileName(entirePath);
someone? :D
« Last Edit: June 07, 2019, 05:46:30 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15377
  • Official Playmaker Support
    • View Profile
Re: get File Name From Path
« Reply #1 on: March 29, 2019, 01: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

looi

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: get File Name From Path
« Reply #2 on: June 06, 2019, 10:46:06 AM »
It works great. Thank you Jean! :)