Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Creating folders

$
0
0

I have a logon script which creates some folders and then copied some network files to the local hard drive.

The "c:\prgram files\NB\Startup" folder gets created and the file copied to it from the network share, the c:\program files\NB\Templates does not get created and no network files is copied to it.  The pc is windows 7 pro and the office suite is office 2010.

dim objFSO
set objFSO = createobject("Scripting.FileSystemObject")
 dim objFolder, objShell, strDirectory
strDirectory = "C:\Program Files\NB\Templates"

objFSO.DeleteFolder("C:\Program Files\NB\Templates\Dep")

Set objFolder = objFSO.CreateFolder(strDirectory)

objFSO.CreateFolder "C:\Program files\NB\Startup"

objFSO.CreateFolder "C:\Program files\NB\Templates"

call CopyFiles("C:\Program Files\NB\Startup", "T:\Templates14\WordAddIn")

call CopyFiles("C:\Program Files\NB\Templates", "T:\Templates14\WordTemplates")

call CopyFiles("C:\Program Files\Microsoft Office\Office14\Library", "T:\Templates14\Dep7_xlam")

call CopyFiles("C:\Program Files\Microsoft Office\Office14\Library", "T:\Templates14\FIS_xlam")

call CopyFiles("C:\Program Files\Microsoft Office\Office14\Library", "T:\Templates14\BC_xlam")


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>