FileInfoMoveTo Method |
Name | Description | |
---|---|---|
MoveTo(String) | Moves a specified file to a new location, providing the option to specify a new file name.
Remarks Use this method to prevent overwriting of an existing file by default. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. | |
MoveTo(String, MoveOptions) | [AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, MoveOptions can be specified.
Return ValueType:Returns a new FileInfo instance with a fully qualified path when successfully moved, Remarks Use this method to allow or prevent overwriting of an existing file. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. | |
MoveTo(String, PathFormat) | [AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.
Return ValueType:Returns a new FileInfo instance with a fully qualified path when successfully moved, Remarks Use this method to prevent overwriting of an existing file by default. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. | |
MoveTo(String, MoveOptions, PathFormat) | [AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, MoveOptions can be specified.
Return ValueType:Returns a new FileInfo instance with a fully qualified path when successfully moved, Remarks Use this method to allow or prevent overwriting of an existing file. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. | |
MoveTo(String, MoveOptions, CopyMoveProgressRoutine, Object) | [AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, MoveOptions can be specified,
and the possibility of notifying the application of its progress through a callback function. Remarks Use this method to allow or prevent overwriting of an existing file. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. | |
MoveTo(String, MoveOptions, CopyMoveProgressRoutine, Object, PathFormat) | [AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, MoveOptions can be specified.
Remarks Use this method to allow or prevent overwriting of an existing file. This method works across disk volumes. For example, the file c:\MyFile.txt can be moved to d:\public and renamed NewFile.txt. Whenever possible, avoid using short file names (such as XXXXXX~1.XXX) with this method. If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior. |