Reading file name

Hi,

How to read the file name alone from Input folder. I tried Path.GetFileName("Data\Input") , but showing blank output. Please help!


@Salman_Faries

You need to mentioned the full path

Path.getfilename(“providefull path”)

Try this once

Hi @Salman_Faries

In the Folder Path remove the \ slash at end.
Give the path like below
“Data\Input”

Hope it helps!!

Hi,

You can use this.

System.IO.Path.GetFileName(yourFilePath)

Hi @Salman_Faries

You can try like this

@Salman_Faries

Please try like this Directory.GetFiles(Path.Combine(Environment.CurrentDirectory,"Data","Input"))

This should solve your issue

Hope this helps

cheers