VB Script to move the Files

Here is simple script that helps to move the required files to different Drive.

I use this script frequently to move the PCK files(only the required PCK files from a near site) from one to other folder after building my site sever before I run my Preload Tool for all the packages at one go. You can do cut and paste the files what are needed but only selected pck file will be preloaded .

dim objfso
Set objfso = CreateObject ("Scripting.FileSystemObject")

Set ReadFile = objfso.OpenTextFile ("F:\PCKFiles\all-files.txt", 1)

Do While Not computerList.AtEndOfStream
FileName = Readfile.ReadLine
SourceFile="D:\SCCM\\" & FileName
DestinationFile="F:\SMSPKG\"

objfso.MoveFile SourceFile, DestinationFile

Loop

Post Comment