Sideway
output.to from Sideway
Draft for Information Only

Content

VBScript Methods of FSO Object
 MoveFile Method
  Syntax
  Argument
  Remark
  Applied to
 MoveFolder Method
  Syntax
  Argument
  Remark
  Applied to
 OpenTextFile Method
  Syntax
  Argument
  Setting
  Applied to

VBScript Methods of FSO Object

Some typical predefined Elements are.

  • FSO Object:
    • BuildPath Method
    • CopyFile Method
    • CopyFolder Method
    • CreateFolder Method ≡ Folder Object
    • CreateTextFile Method
    • DeleteFile Method
    • DeleteFolder Method
    • DriveExists Method
    • FileExists Method
    • FolderExists Method
    • GetAbsolutePathName Method
    • GetBaseName Method
    • GetDrive Method ≡ Drive Object
    • GetDriveName Method
    • GetExtensionName Method
    • GetFile Method ≡ File Object
    • GetFileVersion Method
    • GetFileName Method
    • GetFolder Method ≡ Folder object
    • GetParentFolderName Method
    • GetSpecialFolder Method ≡ Folder object
    • GetStandardStream Method ≡ TextStream object
    • GetTempName Method
    • MoveFile Method
    • MoveFolder Method
    • OpenTextFile Method

MoveFile Method

last updated 14 Dec 2017

is to move one or more given source files to the specified destination.

Syntax

fsoobjvar.MoveFile ( source, destination )

Argument

fsoobjvarRequired. to specify the associated Object instance reference.MoveFileRequired Keyword. to specify the Method of associated Object.sourceRequired. The path to the file or files to be moved. The source argument string can contain wildcard characters in the last path component only.destinationRequired. The path where the file or files are to be moved. The destination argument can't contain wildcard characters.

Remark

  • If source contains wildcards or destination ends with a path separator (\), it is assumed that destination specifies an existing folder in which to move the matching files. Otherwise, destination is assumed to be the name of a destination file to create.
  • In either case, three things can happen when an individual file is moved:
  • If destination does not exist, the file gets moved. This is the usual case.
  • If destination is an existing file, an error occurs.
  • If destination is a directory, an error occurs.
  • An error also occurs if a wildcard character that is used in source doesn't match any files.
  • The MoveFile method stops on the first error it encounters. No attempt is made to roll back any changes made before the error occurs.
  • This method allows moving files between volumes only if supported by the operating system.

Applied to

FileSystemObject Object

MoveFolder Method

last updated 14 Dec 2017

is to move one or more given source folders to the specified destination.

Syntax

fsoobjvar.MoveFolder ( source, destination )

Argument

fsoobjvarRequired. to specify the associated Object instance reference.MoveFolderRequired Keyword. to specify the Method of associated Object.sourceRequired. The path to the folder or folders to be moved. The source argument string can contain wildcard characters in the last path component only.destinationRequired. The path where the folder or folders are to be moved. The destination argument can't contain wildcard characters.

Remark

  • If source contains wildcards or destination ends with a path separator (\), it is assumed that destination specifies an existing folder in which to move the matching files. Otherwise, destination 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:
  • If destination does not exist, the folder gets moved. This is the usual case.
  • If destination is an existing file, an error occurs.
  • If destination is a directory, an error occurs.
  • An error also occurs if a wildcard character that is used in source doesn't match any folders. The MoveFolder method stops on the first error it encounters. No attempt is made to roll back any changes made before the error occurs.
  • Important This method allows moving folders between volumes only if supported by the operating system.

Applied to

FileSystemObject Object

OpenTextFile Method

last updated 14 Dec 2017

is to open a given filename file of the associated FileSystemObject Object according to the specified optional iomode setting, create keyword, and format setting, and to return a TextStream Object that can be used to read from, write to, or append to the file.

Syntax

fsoobjvar.OpenTextFile(filename[, iomode[, create[, format]]])

Argument

fsoobjvarRequired. to specify the associated Object instance reference.OpenTextFileRequired Keyword. to specify the Method of associated Object.filenameRequired. String expression that identifies the file to open.iomodeOptional Setting. Can be one of three constantscreateOptional. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. The value is True if a new file is created, False if it isn't created. If omitted, a new file isn't created.formatOptional Setting. One of three Tristate values used to indicate the format of the opened file (TristateTrue = -1 to open the file as Unicode, TristateFalse = 0 to open the file as ASCII, TristateUseDefault = -2 to open the file as the system default). If omitted, the file is opened as ASCII.

Setting

iomode argument:

ConstantValueDescriptionForReading1Open a file for reading only. You can't write to this file.ForWriting2Open a file for writing.ForAppending8Open a file and write to the end of the file.

format argument:

ConstantValueDescriptionTristateUseDefault-2Opens the file using the system default.TristateTrue-1Opens the file as Unicode.TristateFalse0Opens the file as ASCII.

Applied to

FileSystemObject Object

©sideway

ID: 180500025 Last Updated: 5/25/2018 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019