Login | |
|
 |
RE: I need help, please help, - 2/6/2008 1:45:48 AM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
something like this For Each file in objFolderA.Files If DateDiff("n", file.DateLastModified, Now) =< 60 Then objFSO.CopyFile file.Path, UsbKey End If
_____________________________
"You start coding. I'll go find out what they want."
|
|
| |
|
|
|
 |
RE: I need help, please help, - 2/15/2008 3:09:04 AM
|
|
 |
|
| |
dmp_92
Posts: 70
Score: 0
Joined: 2/1/2008
Status: offline
|
I need to make a slight change to the script. I will post the first section. Option Explicit 'Dim objWMIService, objItem, colItems Dim strComputer, strMbox, ArrDriveType, WMI, coldisks, disk, strtype, strID, strSys, UsbKey, file, USBFound Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject") Dim objFolderA: Set objFolderA=objFSO.GetFolder("\\bluewater\departments$\Information Technology\test\") '****************** check to see if the files are more current ************************************************ ' For Each file in objFolderA.Files ' Check for reg key "here" ' if no reg key found on computer then continue with script ' if reg key is more current then file then ' WScript.Quit '************************************************************************************************************** The last part of the script that needs to be modified is this '*********************************** Change this section to just copy all current files and place a reg key somewhere on the PC *********** For Each file in objFolderA.Files If DateDiff("n", file.DateLastModified, Now) =< 60 Then objFSO.CopyFile file.Path, UsbKey End If ' after files are copied over create msg box to say that all files have been copied over succesfully ******************** '************************************************************************************************************************
|
|
| |
|
|
|
|
|