Home  |  Delphi .net Home  |  System.IO.Directory  |  SetCurrentDirectory Method
  
SetCurrentDirectory  
Method  
Set the Current Directory (folder)
Directory Class
System.IO NameSpace
NotCF1.  Procedure SetCurrentDirectory ( PathString : String ) ; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Sets the Current Directory (folder) to the absolute or relative path specified in PathSting. 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