[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

Change Directory

Ok...I think this may be a stupid question, but I'm swallowing my pride and asking it anyway.  My program resides in c:\myprog directory. How can I change directories to e:\otherplace so that when I do a command from the user it is performed on the e:\otherplace directory without have to specify the path as part of the command?

I am interfacing with another program that passes me a command, which could be the "Del" command or some other command that needs to be performed on the e:\otherplace directory.

Thanks in advance and for not laughing,

  • 2
1 Solution

use :

currentdir : string;
currentdir  := getcurrentdir;

you must have SysUtils in the use clause

regards, marc
dhertzfeAuthor Commented:
DAMN!!!   I just found it myself but you beat me too it.

Thanks Marc....I knew this was going to be easy.
sometimes I am lucky to be the first one to answer easy questions...

otherways I would never be able to get expert points :=)

thanks, Marc

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now