Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Change DOS current directory

Nick2
New Contributor I
660 Views

If my STR is defined as 'CD "C:Program FilesBlah SomethingSomething" '

And I call,

CALL SYSTEM(STR)

Shouldn't this change my working directory? Doesn't seem to work :-

0 Kudos
1 Reply
Steven_L_Intel1
Employee
660 Views
SYSTEM creates a new process. It changes the working directory of the new process, which then exits. Same thing if you try to do a "set" using SYSTEM. You want the SetCurrentDirectory Win32 API routine.
0 Kudos
Reply