I wouldn't write your own script to do this. And besides, I don't think
that there are many people here that are good at VB - a MS
list/newsgroups might be much better for such questions.
My hint is to use robocopy.exe - it's a free tool available from
Microsoft which does an excellent job with automated file operations.
You can configure it to do almost everything, and the error handling is
probably much better than you'll be able to script on your own.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[
mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Wes
Sent: Wednesday, July 11, 2007 9:59 PM
To: midrange-l@xxxxxxxxxxxx
Subject: archive IFS folder to Windows using VBS
I've put together a VB script that will move the IFS folder and it's
content
to W2003 server. The script works fine on windows but on mapped IFS
drive,
it only create the folder. It doesn't delete it from IFS or copy the
content
of the folder...any help would be greatly appreciated.
code:
Sub MoveFolderList(folderspec, destination)
'folderspec is the mapped IFS folder
Dim fs, f, f1, s, sf, i, DateDif,
Dim FolderSystem, folderx, folder1, s, subfolderx, i, DateDif
set FolderSystem =CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set folderx = FolderSystem.GetFolder(folderspec)
Set sf = f.SubFolders
set subfolderx = folderx.SubFolders
For Each f1 in sf
For each folderx in suboldersx
i = i + 1
DateDif = DateDiff("d",f1.DateLastModified, Now())
if DateDif > 340 then
'check if subfolder already exists
folderx1.move destination
end if
Next
End Sub
As an Amazon Associate we earn from qualifying purchases.