How do you get the Getfile() command to start in a specified directory?

Respectfully,

Jonathan M*

Re: Getfile() Q. by David

David
Wed Sep 15 09:26:42 CDT 2004

Jonathan,

You have to change to that directory first

lcSave = curdir()
cd WhereYouWantToBe
lcFile = getfile()
cd (lcSave)

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro


"Morningstar" <REMOVEjm@ablecon.com> wrote in message
news:41484e04$1_1@127.0.0.1...
> How do you get the Getfile() command to start in a specified directory?



Re: Getfile() Q. by Rick

Rick
Wed Sep 15 09:31:02 CDT 2004

Jonathan,
Use SET DEFAULT TO the directory you want to start in. You may want to =
save off your current location and reset it after the Getfile() call!

lcSvDefault =3D fullpath(set("default"))
SET DEFAULT TO <where I want to start>
lcFileName =3D Getfile()
SET DEFAULT TO (lcSvDefault)

Rick

"Morningstar" <REMOVEjm@ablecon.com> wrote in message =
news:41484e04$1_1@127.0.0.1...
> How do you get the Getfile() command to start in a specified =
directory?
>=20
> Respectfully,
>=20
> Jonathan M*=20
>=20
>

RE: Getfile() Q. by Leemi

Leemi
Wed Sep 15 09:33:31 CDT 2004

Hi Jonathan:

>How do you get the Getfile() command to start in a specified directory?

>Respectfully,

>Jonathan M*

Can you simply issue a CD command to switch to the folder you want to start
in and then use CD to switch back to the original folder after calling the
GetFile() function?

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003



Re: Getfile() Q. by Anders

Anders
Wed Sep 15 10:35:03 CDT 2004

spec="D:\VFPDATA"
x= GETDIR(spec,'open','Select a .DBF file',16384,.T.)
The last parameters locks you into the spec folder and its subfolders
Theres' an anomolous \ added to the result even when a file, not a folder,
is selected.
You can use DIRECTORY(x) to check what it is.
-Anders

"Morningstar" <REMOVEjm@ablecon.com> wrote in message
news:41484e04$1_1@127.0.0.1...
> How do you get the Getfile() command to start in a specified directory?
>
> Respectfully,
>
> Jonathan M*
>
>