Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing folders while running from command window
Message
From
16/04/2002 20:56:04
 
 
To
16/04/2002 17:10:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00645637
Message ID:
00645771
Views:
11
>Hi Jamie,
>
>I've run into this before and I think that I read here that there was a bug in one of the VFP commands like getdir() or getfile() or something in an early release of VFP6 or 7 that caused this to happen.
>
>Where this consistantly happens is when I print a report or text file to Adobe PDF writer. This ALWAYS changes the VFP default directory to that specified in the "print to" dialog for PDF Writer. Since I discovered this, I always assign the current directory value to a variable, print reports and reset it back if it has changed. Ive also seen some third party controls do the same thing.

The GETDIR() dialog has a nasty tendency to alter the current working directory when a selection is made hrough it;a good rule is to save the actual selected directory prior to issuing a GETDIR() and restore the initial path following the GETDIR(). When some alternative directory dialogroutines are used instead of the native GETDIR(), such as Shell.Application's BrowseForFolder method and Bela Bodecs' bbGetDir ocx, these side effects are not applicable; both alternatives offer greater functionality including added support for network addresses and special folders. The use of BrowseForAFolder() is covered in the FAQ in the item on an enhanced GetDir(), and bbGetDir is available in the download section.
>
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform