1
a. fso.MoveFile("C:\Data\CustData.txt","C:\BackUp\CustData.txt")
b. fso.MoveFile("C:\BackUp\CustData.txt", "C:\Data\CustData.txt")
c. fso.FileMove("C:\Data\CustData.txt","C:\BackUp\CustData.txt")
d. fso.FileMove("C:\BackUp\CustData.txt", "C:\Data\CustData.txt")

1 Answer

2

Answer:

fso.MoveFile("C:\Data\CustData.txt","C:\BackUp\CustData.txt")

Explanation:

Given

Source = C:\Data\CustData.txt

Destination = C:\BackUp\CustData.txt

Required

Code snippet to move file between directories using VScript

First, we need to write out the syntax.

The syntax to implement this is:

fso.MoveFile(Source Path, Destination Path)

The above line of code instructs the system to move the file from its source directory to its destination.

Note that the source path and destination path must include the full directories and the file extensions

In this case, the correct code is:

fso.MoveFile("C:\Data\CustData.txt","C:\BackUp\CustData.txt")

Edit
avatar
answered 6 months ago