playMaker

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

looi

  • Playmaker Newbie
  • *
  • Posts: 21
get File Name From Path[SOLVED]
« 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_

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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: get File Name From Path
« Reply #1 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

looi

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