0

Hi Guys ,I need help!

When I extract file path with ExtractFilePath (paramstr(0))

I'm getting this: C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\Win32\Debug but I need to go 2 step back. C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\

I don't know, How?

ExtractFilePath (paramstr(0)) how to make 2 step back ....\

I tried (ExtractFilePath (paramstr(0))+'....\')

result:

C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\Win32\D‌​ebug\..\..\
Alex Kirov
  • 217
  • 4
  • 16
  • C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\Win32\D‌​ebug\..\..\ is the same as C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\ – Dsm Feb 13 '17 at 13:45
  • FWIW you might use PathCanonicalize - see http://stackoverflow.com/a/5329520/587106 – Stefan Glienke Feb 13 '17 at 13:49

1 Answers1

4
ExtractFileDir(ExtractFileDir(ExtractFileDir(ParamStr(0)))) 
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490