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

Default Directory not retained in Visual Foxpro

I can't get Visual Foxpro to retain my default directory between sessions on my laptop. So for example: I load VFP and type
 set default to c:\
into the command line. I then select Options from the Tools menu and click the set as default button then OK. I then quit VFP and reload it. The default directory resets to whatever is the start directory of the icon used to load VFP. This is different to how it works on my desktop machine which retains the set default setting between sessions. Any ideas please? I am using VFP9 SP2 on both machines.
0
Caltor
Asked:
Caltor
  • 3
  • 2
1 Solution
 
pcelbaCommented:
You have to manually set the default value in Tools - Options dialog. Simple press "Set As Default" button does not set the default directory.

So, go to the File Locations tab on Options dialog and set the Default directory option value. Then press "Set As Default" button and everything should work.
0
 
CaltorAuthor Commented:
Thanks pcelba

The key here was the "Use default directory" checkbox in the 'Change File Location' dialog that ensures the setting is retained between sessions. I don't think there is a way of setting this through the command line.
0
 
pcelbaCommented:
The way to set it from command window exists but you have to write the Default directory setting to Windows Registry...

Another option is DEFAULT setting in CONFIG.FPW
You may obtain existing configuration file name and path by   ? SYS(2019). If it return empty string then there is no configuration file used on VFP startup. You may create it in VFP home directory or startup folder.
0
 
CaltorAuthor Commented:
Thanks for the extra info.
0
 
pcelbaCommented:
You are welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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