Sideway
output.to from Sideway







Draft for Information Only

VBScript Methods of FSO File Object

Some typical predefined Elements are.

  • FSO File Object:
    • Copy Method
    • Delete Method
    • Move Method
    • OpenAsTextStream Method ≡ TextStream object

Copy Method

last updated 2017/12/16

is to copy the associated file or folder object to the specified destination according to the specified overwrite setting.

Syntax

fsofolderobjvar.Copy( destination[, overwrite] )
fsofileobjvar.Copy( destination[, overwrite] )

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.CopyRequired Keyword. to specify the Method of associated Object.destinationRequired. Destination where the file or folder is to be copied. Wildcard characters are not allowed.overwriteOptional. Boolean value that is True (default) if existing files or folders are to be overwritten; False if they are not.

Remarks

  • The results of the Copy method on a File or Folder are identical to operations performed using FileSystemObject.CopyFile or FileSystemObject.CopyFolder where the file or folder referred to by object is passed as an argument.
  • However, that the alternative methods are capable of copying multiple files or folders.

Applied to

Folder Object, File Object

Delete Method

last updated 2017/12/16

is to delete the associated file or folder object according to the force setting.

Syntax

fsofolderobjvar.Delete( [force])
fsofileobjvar.Delete( [force])

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.DeleteRequired Keyword. to specify the Method of associated Object.forceOptional. Boolean value that is True if files or folders with the read-only attribute set are to be deleted; False (default) if they are not.

Remarks

  • An error occurs if the specified file or folder does not exist.
  • The results of the Delete method on a File or Folder are identical to operations performed using FileSystemObject.DeleteFile or FileSystemObject.DeleteFolder.
  • The Delete method does not distinguish between folders that have contents and those that do not.
  • The specified folder is deleted regardless of whether or not it has contents.

Applied to

Folder Object, File Object

Move Method

last updated 2017/12/16

is to move folder or file of the associated Folder or File Object to the specified destination.

Syntax

fsofolderobjvar.Move( destination )
fsofileobjvar.Move( destination )

Argument

fsofolderobjvar | fsofileobjvarRequired. to specify the associated Object instance reference.MoveRequired Keyword. to specify the Method of associated Object.destinationRequired. Destination where the file or folder is to be moved. Wildcard characters are not allowed.

Remarks

  • The results of the Move method on a File or Folder are identical to operations performed using FileSystemObject.MoveFile or FileSystemObject.MoveFolder.
  • However, that the alternative methods are capable of moving multiple files or folders.

Applied to

Folder Object, File Object

OpenAsTextStream Method

last updated 2017/12/16

is to open a TextStream Object of the associated File Object according to specified optional iomode setting and format setting for reading from, writing to, or appending to the file.

Syntax

fsofileobjvar.OpenAsTextStream([iomode, [format]])

Argument

fsofileobjvarRequired. to specify the associated Object instance reference.OpenAsTextStreamRequired Keyword. to specify the Method of associated Object.iomodeOptional Setting. Indicates input/output mode. Can be one of three constants: ForReading, ForWriting, or ForAppending.formatOptional Setting. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.

Settings

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.

Remarks

  • The OpenAsTextStream method provides the same functionality as the OpenTextFile method of the FileSystemObject. In addition, the OpenAsTextStream method can be used to write to a file.

Applied to

File Object
Optional Element, Content Occurrence Character, Choice or sequence:(…)+one or more(…)*zero or more(…)?zero or one times(…)exactly once[…]optional(… | …)or( … & …)and( …, … )sequence⋯=⋯assign to⋯.⋯dot notation(+)include(-)exclude

©sideway

ID: 180600007 Last Updated: 2018/6/7 Revision:

IMAGE

Home (1)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (330)

Reference (60)

Computer

Hardware (148)

Software

Application (187)

Digitization (24)

Numeric (19)

Programming

Web (530)

HTML

Knowledge Base

Common Color (1)

Html Entity (Unicode) (1)

Html 401 Special (1)

OS (366)

MS Windows

Windows10 (1)

DeskTop (5)

Knowledge

Mathematics

Formulas (8)

Number Theory (69)new

Algebra (14)

Trigonometry (18)

Geometry (18)

Calculus (66)

Engineering

Tables (8)

Mechanical

Control

Process Control (1)

Mechanics (1)

Rigid Bodies

Statics & Dynamics (128)

Fluid (5)

Fluid Kinematics (5)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)


facebook
Latest Updated Links

Copyright © 2000-2018 Sideway . All rights reserved Disclaimersfacebook last modified on 08 Mar 2018