Eswar Koneti's Blog

All about Configmgr and its connected objects…….

  • About Author
      View eswar koneti's LinkedIn profile
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 99 other subscribers

  • Awards


  • FaceBook Updates

  • Catagories

  • Meta

  • Copyright!

    All the blog posts in this website are owned by Eswar Koneti and may not be reused in any mode without prior approval of Eswar Koneti. You may quote one paragraph from the blog posts if you link to the original blog post.
    Happy Reading!

VB Script to move the Files

Posted by Eswar Koneti on September 12th, 2012

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

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>