Default Directory not retained in Visual Foxpro

Posted on 2009-12-16
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
    LVL 41

    Accepted Solution

    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.
    LVL 3

    Author Closing Comment

    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 41

    Expert Comment

    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.
    LVL 3

    Author Comment

    Thanks for the extra info.
    LVL 41

    Expert Comment

    You are welcome.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    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://msd…
    After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now