Home  |  Delphi .net Home  |  System.IO.Directory  |  GetCurrentDirectory Method
  
GetCurrentDirectory  
Method  
Get the Current Directory (folder)
Directory Class
System.IO NameSpace
NotCF1.  Function GetCurrentDirectory : String; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Gets the full path of the Current Directory (folder). The Current Directory is the default location for file activity.
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System.IO
System.IO.Directory
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
Setting and getting the current directory
program Project1;
{$APPTYPE CONSOLE}

uses
  System.IO;

begin
  // Set the current directory
  System.IO.Directory.SetCurrentDirectory('C:\Program Files');

  // Display the current directory
  Console.WriteLine(System.IO.Directory.GetCurrentDirectory);

  Console.Readline;
end.
   C:\Program Files
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author