登录

用户名:

密码:
DrivePath(drvPath)     
作者:luckzy1228
发部日期:Mon, 04/16/2007

获得驱动器路径 

<cfscript>
/**
 * Returns the path for the specified drive. (Windows only)
 *
 * @param drvPath   Drive letter (c, c:, c:\) or network share (\\computer\share).
 * @return Returns a string.
 * @author Rob Brooks-Bilson (rbils@amkor.com)
 * @version 1.0, July 19, 2001
 */
function DrivePath(drvPath)
{

   Var fso  = CreateObject("COM", "Scripting.FileSystemObject");
   Var drive = fso.GetDrive(drvPath);
   Return drive.Path;
}
</cfscript>

<CFSET TheDrive = "S">
<CFOUTPUT>
The path for the #TheDrive# drive is #DrivePath(TheDrive)#
</CFOUTPUT>

最后更新:Mon, 04/16/2007