Zahid_iLab3 - Date:07/24/2011 Name:ZeeshanZahid LabNumber:3

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Date: 07/24/2011 Name: Zeeshan Zahid Lab Number: 3 Exercise # 1 Source Code and Screen Shot of the output  (10 Points) 'programmer: Zeeshan Zahid 'created on 7/24/2011 'purpose: demonstrates how to create and call a VBS function option explicit wscript.echo "the program has started and a call to the UDF will now be made" call printName() 'this function prints a name function printName() wscript.echo "Zeeshan Zahid" end function
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Exercise # 2 Source Code and Screen Shot of the output  (10 Points) 'programmer: Zeeshan Zahid 'created on 7/24/2011 'purpose: creates a folder given a path and folder name option explicit dim folderName folderName = inputbox("enter the path and name of your new folder:")
Background image of page 2
call createFolder(folderName) function createFolder(newFolderPathName) 'create a folder at the given path and with the given name 'display an error message if the folder already exists dim objFSO set objFSO = CreateObject("scripting.fileSystemObject") if objFSO.FolderExists(newFolderPathName) then else call objFSO.CreateFolder(newFolderPathName) end if end function
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Exercise # 3 Source Code and Screen Shot of the output  (10 Points) 'programmer: Zeeshan Zahid 'created on 7/24/2011 'purpose: copies files from folder A to folder B 'if folder B does not exist it is created option explicit call copyAllFiles("c:\testFolder", "c:\newFolder") wscript.echo "copy complete"
Background image of page 4
function copyAllFiles(fromFolder , toFolder) 'this function copies all files in the fromFolder to the toFolder 'if the toFolder does not exist it is created
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Zahid_iLab3 - Date:07/24/2011 Name:ZeeshanZahid LabNumber:3

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online