Config.fpw default directory config

I have an issue with a config.fpw file. Whatever i write in the DeFAULT Clause the default directory remains the same.
Can you give me some help with this

Here are the Config.fpw lines
PATH = "c:\FolderToBe"
DEFAULT = c:
RESOURCE = OFF
DATE = BRITISH
EXCLUSIVE = OFF
SECONDS = ON
ESCAPE = OFF
OPTIMIZE = ON
SEPARATOR = " "
STRICTDATE = 1
And after a display status being issued the default directory always remains the same. Please check the annexed file with the "Display Status" capture.
Kind regards
Lucilia
Gloomy.TXT
luciliacoelhoAsked:
Who is Participating?
 
jsrebnikCommented:
From the txt file it looks like you're starting VFP from the Windows Start menu.  Captain Cyril is correct about putting the default directory in quotes.  You can also put the config.fpw file in another folder ("C:\MyFolder") if you'd like and start VFP with a shortcut like

"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 9\VFP9.EXE" - cc:\myfolder\config.fpw

Your choice.
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Try
DEFAULT = "C:\"

it needs to be between quotes.

Make sure there is no other config.fpw that is taking priority over this one.
0
 
luciliacoelhoAuthor Commented:
Thanks for you help. And within a project before I compile and create the project how I can define which will be the config.gpw the executable will use.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
The config.fpw should be build in the project along with the exe. If you are running the exe on the client's computer it won't look in the original FoxPro development directory.

On your computer you are launching Development Version of FoxPro so it is loading the config.fpw in the vfp.exe folder.
0
 
Olaf DoschkeSoftware DeveloperCommented:
An exe always will search for a file config.fpw right beside it in the same folder.

You can also always define what config.fpw an exe will use by calling it with -c parameter: your.exe -cD:\somefolder\somepath\config.fpw

Without any space between -c and the path to the config.fpw.

You can also name the file as you like via the -c parameter.

Actually you don't need it at all, as you can also put ll the settings into your main.prg. Everything you put into the config file can be changed. For some things that may make sense, for other setting you probably don't want anyone to be able to change it, eg for EXCLUSIVE, so you better code that into the main.prg

Bye, Olaf.
0
 
luciliacoelhoAuthor Commented:
Dear all,
Thanks very much for your help. Light is out coming from your feed backs, altough I have a pending issue, the default directory.
The link I use to call Visual Fox is parametrized as follows:

"C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe" -cC:\CliniCAre\_outros\config.txt

The config.fpw was renamed as a text file and it's attached on this message.
And the resulting disp status output is also in a attches file MyDispStat.txt
config.txt
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Try using config.fpw not config.txt.
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Also make sure the extension is fpw since you might have extensions hidden in Windows.
0
 
luciliacoelhoAuthor Commented:
I have tried files with both extensions with the same result, the deafault drive doesn't change
0
 
luciliacoelhoAuthor Commented:
Can anyone add something to my last post?

0
 
Olaf DoschkeSoftware DeveloperCommented:
MyDispStat.txt shows, that the config is found and in effect, as the PATH setting is changed (File search path: C:\MYWORKINGFOLDER)

To see why DEFAULT = "C:" does not work, try this at the command line, after starting VFP:

? CurDir()

It will most probably display C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 9

Now do this
SET DEFAULT TO C:

? CurDir()

See? The directory didn't change. The same happens with the config.

now SET DEFAULT TO C:\ and ? CurDir()

See?

I can't tell you why it's not working without a backslash, but you only have a path with a backslash, otherwise you just have specified the drive letter, and that makes VFP keep the current directory unchanged.

Bye, Olaf.
0
 
Olaf DoschkeSoftware DeveloperCommented:
The essence: You can simply try to do all the stuff you set in the config.fpw at the command line (of course transposed into SET xyz TO ... instead of xyz = ...) and see if and how it works. Then you don't need to puzzle what's the fault.

Bye, Olaf.
0
 
luciliacoelhoAuthor Commented:
The proposed solutuions did not work in terms of default directory configuration
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.

All Courses

From novice to tech pro — start learning today.