📄 vbs346.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>
<HEAD>
<TITLE>MoveFolder Method</TITLE>
<META NAME="CATEGORY" CONTENT="Language Reference">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<META NAME="PRODUCT" CONTENT="Visual Basic Scripting Edition">
<META NAME="TECHNOLOGY" CONTENT="SCRIPTING">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="MoveFolder Method">
</HEAD>
<BODY BGCOLOR=FFFFFF LINK=#0033CC>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR VALIGN=TOP><TD WIDTH=360>
<FONT SIZE=1 COLOR=#660033>Microsoft® Visual Basic® Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>MoveFolder Method</B></FONT></TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2> <A HREF="vbstoc.htm">Language Reference</A> <BR>
<A HREF="vbs16.htm">Version 3</A> <P></FONT>
</TD></TR>
</TABLE>
<FONT SIZE=2><p>
<A HREF="vbs348.htm">See Also</A> <A HREF="vbs347.htm">Applies To</A></FONT>
<HR noshade SIZE=1>
<H5>Description</H5>
<BLOCKQUOTE>Moves one or more folders from one location to another.</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE><i>object</i>.<b>MoveFolder</b> <i>source</i>, <i>destination</i>
<P>The <b>MoveFolder</b> method syntax has these parts:
<P>
<TABLE WIDTH=87% BORDER=1 CELLPADDING=5 CELLSPACING=0>
<TR VALIGN=TOP BGCOLOR="#DDDDDD">
<TD><FONT SIZE=2><b>Part</b></FONT></TD>
<TD><FONT SIZE=2><b>Description</b></FONT></TD></TR>
<tr valign=top><td><font size=2><i>object</i></font></td>
<td><font size=2>Required. Always the name of a <b>FileSystemObject</b>.</font></td></tr>
<tr valign=top><td><font size=2><i>source</i></font></td>
<td><font size=2>Required. The path to the folder or folders to be moved. The <i>source</i> argument string can contain wildcard characters in the last path component only.</font></td></tr>
<tr valign=top><td><font size=2><i>destination</i></font></td>
<td><font size=2>Required. The path where the folder or folders are to be moved. The <i>destination</i> argument can't contain wildcard characters.</font></td></tr>
</TABLE></BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>
If <i>source</i> contains wildcards or <i>destination</i> ends with a path separator (\), it is assumed that <i>destination</i> specifies an existing folder in which to move the matching files. Otherwise, <i>destination</i> is assumed to be the name of a destination folder to create. In either case, three things can happen when an individual folder is moved:
<ul>
<li>If <i>destination</i> does not exist, the folder gets moved. This is the usual case.
<li>If <i>destination</i> is an existing file, an error occurs.
<li>If <i>destination</i> is a directory, an error occurs.
</ul>
<p>An error also occurs if a wildcard character that is used in <i>source</i> doesn't match any folders. The <b>MoveFolder</b> method stops on the first error it encounters. No attempt is made to roll back any changes made before the error occurs.
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=87%><TR><TD COLSPAN=2 VALIGN=BOTTOM><hr noshade size=1></TD></TR><TR>
<TD VALIGN=TOP><FONT SIZE=2><b>Important</b> This method allows moving folders between volumes only if supported by the operating system. </FONT></TD></TR>
<TR><TD COLSPAN=2 VALIGN=TOP><hr noshade size=1></TD></TR></TABLE>
</BLOCKQUOTE>
<hr noshade size=1>
<FONT SIZE=2>
<p align=center><em><a href="../../common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
</FONT></FONT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -