Set Volume, Sys(2027)

These commands were meant to help you handle the differences between directory (folder) conventions on PCs and Macs. Of course, with Visual FoxPro/Mac available only in Version 3, this isn't much of an issue anymore. In fact, these two aren't even included in the VFP 5 or VFP 6 Help files. SET VOLUME is back in the VFP 7 Help.SET VOLUME lets you assign a DOS-type drive name to a Mac volume or folder. SYS(2027) is supposed to convert from DOS notation to Mac notation, but it doesn't.

Usage

SET VOLUME DriveName TO [ FolderName ]
cMacPath = SYS( 2027, cDOSPath )

SET VOLUME is really pretty cool. It works in the Windows versions of VFP, too, not just on the Mac. You can use it to assign a shorthand drive name to a particular directory, then refer to that directory using the drive name. We don't think we'd do this in an application, but it is pretty neat while you're developing. We've heard of some problems in network situations, but can't replicate them ourselves. Everything seems to work properly on local drives. On the Mac, of course, this command was an essential part of a cross-platform strategy.


Issuing SET VOLUME without the FolderName turns off the mapping.There's no way in Visual FoxPro to see what mappings you've created, unfortunately. SET("VOLUME") doesn't work. Help says the mappings show up in DISPLAY STATUS, but they don't. Another sign that Microsoft doesn't want us to use this command is that it's not included in IntelliSense.

SYS(2027) doesn't work in Visual FoxPro. Hand it a path and you get back the same path in the same old DOS notation.


Example

SET VOLUME q: TO _SAMPLES+"TasTrade"
MODI PROJ Q:TasTrade

See Also

Set Default, Set Path


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .