Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Default Directory not retained in Visual Foxpro

Posted on 2009-12-16
Medium Priority
Last Modified: 2012-06-21
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.
Question by:Caltor
  • 3
  • 2
LVL 43

Accepted Solution

pcelba earned 2000 total points
ID: 26061288
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.

Author Closing Comment

ID: 31666689
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.
LVL 43

Expert Comment

ID: 26061512
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.

Author Comment

ID: 26061729
Thanks for the extra info.
LVL 43

Expert Comment

ID: 26061829
You are welcome.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
What happened when I tried to make my phone, a Samsung Galaxy S8, stop dropping all WiFi signals was a saga I won't repeat here, but what you might want to know is how it started and how I got it working again.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question