Hi everyone.
I need to create a login script that copy a lot of files from a directory
for other.
I've already done one like this but I need to make from a lot of directories
from others.

Here is the script that I'm using now:

fromDir = "c:\1"
toDir = "c:\2"

start = Now()
replaceSize = 0
copySize = 0
deleteSize = 0
noChangeSize = 0

Set fso = CreateObject("Scripting.FileSystemObject")

Set logFile = fso.OpenTextFile("Sincronizacao.log", 8, True)
logFile.WriteLine("")
logFile.WriteLine("Iniciado ................... : " & start)
logFile.WriteLine("Origem ..................... : " & fromDir)
logFile.WriteLine("Destino..................... : " & toDir)

If fso.FolderExists(fromDir) And fso.FolderExists(toDir) Then
Call ReplicateDirectory(fromDir, toDir)
Else
logFile.WriteLine("Erro ...................... : Origem ou Destino
inalcancaveis")
End If

Sub ReplicateDirectory(source, target)
Set targetDir = fso.GetFolder(target)
Set sourceDir = fso.GetFolder(source)
Set targetDirFileList = targetDir.Files
Set sourceDirFileList = sourceDir.Files
Set targetDirFolderList = targetDir.SubFolders
Set sourceDirFolderList = sourceDir.SubFolders
For Each targetFile in targetDirFileList
If fso.FileExists(source & "\" & targetFile.Name) Then
Set sourceFile = fso.GetFile(source & "\" & targetFile.Name)
If targetFile.DateLastModified <> sourceFile.DateLastModified Then
targetFilePath = targetDir.Path & "\" & targetFile.Name
'targetFile.Delete(True)
replaceSize = replaceSize + sourceFile.Size
sourceFile.Copy targetFilePath
Else
noChangeSize = noChangeSize + sourceFile.Size
End If
Else
noChangeSize = noChangeSize + targetFile.Size
'targetFile.Delete()
End If
Next
For Each sourceFile in sourceDirFileList
If Not fso.FileExists(target & "\" & sourceFile.Name) Then
copySize = copySize + sourceFile.Size
sourceFile.Copy targetDir.Path & "\" & sourceFile.Name
End If
Next
'For Each targetFolder in targetDirFolderList
'If Not fso.FolderExists(sourceDir & "\" & targetFolder.Name) Then
'deleteSize = deleteSize + targetFolder.Size
'targetFolder.Delete(True)
'End If
'Next
For Each sourceFolder in sourceDirFolderList
If Not fso.FolderExists(targetDir & "\" & sourceFolder.Name) Then
copySize = copySize + sourceFolder.Size
sourceFolder.Copy(targetDir & "\" & sourceFolder.Name)
Else
Call ReplicateDirectory(sourceFolder.Path, targetDir & "\" &
sourceFolder.Name)
End If
Next
End Sub

finish = Now()

logFile.WriteLine("Arquivos Identicos.......... : " & Round(noChangeSize /
1024 /1024, 1) & " MB")
logFile.WriteLine("Arquivos Apagados........... : " & Round(deleteSize /
1024 /1024, 1) & " MB")
logFile.WriteLine("Sincronizados............... : " & Round(replaceSize /
1024 /1024, 1) & " MB")
logFile.WriteLine("Copiados para o Destino..... : " & Round(copySize / 1024
/1024, 1) & " MB")
logFile.WriteLine("Tempo de execução........... : " & DateDiff("n", start,
finish) & " MIN")
logFile.WriteLine("Total Transferido........... : " & Round((replaceSize +
copySize) / 1024 / 1024, 1) & " MB")
logFile.WriteLine("Finalizado.................. : " & finish)
logFile.Close()



My problem is: Need to sync a lot of Dir's with just one VBS.
Tnks

Re: Copy files by LakeGator

LakeGator
Fri Nov 04 20:30:18 CST 2005


"Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
message news:ACE30CE5-2F32-44B9-8FC4-F9497CAC69F1@microsoft.com...
> Hi everyone.
> I need to create a login script that copy a lot of files from a directory
> for other.
> I've already done one like this but I need to make from a lot of
> directories
> from others.
>
> Here is the script that I'm using now:
>
> fromDir = "c:\1"
> toDir = "c:\2"
>
> start = Now()
> replaceSize = 0
> copySize = 0
> deleteSize = 0
> noChangeSize = 0
>
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> Set logFile = fso.OpenTextFile("Sincronizacao.log", 8, True)
> logFile.WriteLine("")
> logFile.WriteLine("Iniciado ................... : " & start)
> logFile.WriteLine("Origem ..................... : " & fromDir)
> logFile.WriteLine("Destino..................... : " & toDir)
>
> If fso.FolderExists(fromDir) And fso.FolderExists(toDir) Then
> Call ReplicateDirectory(fromDir, toDir)
> Else
> logFile.WriteLine("Erro ...................... : Origem ou Destino
> inalcancaveis")
> End If
>
> Sub ReplicateDirectory(source, target)
> Set targetDir = fso.GetFolder(target)
> Set sourceDir = fso.GetFolder(source)
> Set targetDirFileList = targetDir.Files
> Set sourceDirFileList = sourceDir.Files
> Set targetDirFolderList = targetDir.SubFolders
> Set sourceDirFolderList = sourceDir.SubFolders
> For Each targetFile in targetDirFileList
> If fso.FileExists(source & "\" & targetFile.Name) Then
> Set sourceFile = fso.GetFile(source & "\" & targetFile.Name)
> If targetFile.DateLastModified <> sourceFile.DateLastModified Then
> targetFilePath = targetDir.Path & "\" & targetFile.Name
> 'targetFile.Delete(True)
> replaceSize = replaceSize + sourceFile.Size
> sourceFile.Copy targetFilePath
> Else
> noChangeSize = noChangeSize + sourceFile.Size
> End If
> Else
> noChangeSize = noChangeSize + targetFile.Size
> 'targetFile.Delete()
> End If
> Next
> For Each sourceFile in sourceDirFileList
> If Not fso.FileExists(target & "\" & sourceFile.Name) Then
> copySize = copySize + sourceFile.Size
> sourceFile.Copy targetDir.Path & "\" & sourceFile.Name
> End If
> Next
> 'For Each targetFolder in targetDirFolderList
> 'If Not fso.FolderExists(sourceDir & "\" & targetFolder.Name) Then
> 'deleteSize = deleteSize + targetFolder.Size
> 'targetFolder.Delete(True)
> 'End If
> 'Next
> For Each sourceFolder in sourceDirFolderList
> If Not fso.FolderExists(targetDir & "\" & sourceFolder.Name) Then
> copySize = copySize + sourceFolder.Size
> sourceFolder.Copy(targetDir & "\" & sourceFolder.Name)
> Else
> Call ReplicateDirectory(sourceFolder.Path, targetDir & "\" &
> sourceFolder.Name)
> End If
> Next
> End Sub
>
> finish = Now()
>
> logFile.WriteLine("Arquivos Identicos.......... : " & Round(noChangeSize /
> 1024 /1024, 1) & " MB")
> logFile.WriteLine("Arquivos Apagados........... : " & Round(deleteSize /
> 1024 /1024, 1) & " MB")
> logFile.WriteLine("Sincronizados............... : " & Round(replaceSize /
> 1024 /1024, 1) & " MB")
> logFile.WriteLine("Copiados para o Destino..... : " & Round(copySize /
> 1024
> /1024, 1) & " MB")
> logFile.WriteLine("Tempo de execução........... : " & DateDiff("n", start,
> finish) & " MIN")
> logFile.WriteLine("Total Transferido........... : " & Round((replaceSize +
> copySize) / 1024 / 1024, 1) & " MB")
> logFile.WriteLine("Finalizado.................. : " & finish)
> logFile.Close()
>
>
>
> My problem is: Need to sync a lot of Dir's with just one VBS.
> Tnks

The approach that sees simplest would be to have the list of from and to
directories in a comma separated file (CSV). Place each pair of directory
names, separated by a comma on each record of a text file that your script
opens as input. Read each record, parse the from and to into fromDir and
toDir and proceed with your current code. Do while not AtEndOfStream and
enjoy.



Hope this helps.



Re: Copy files by ThiagoFerreira

ThiagoFerreira
Mon Nov 07 05:06:08 CST 2005

Hi LakeGator.....I understood your idea but I dont know how to do that.
Could you modify this script to a new one for me ?
Tnks

"LakeGator" wrote:

>
> "Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
> message news:ACE30CE5-2F32-44B9-8FC4-F9497CAC69F1@microsoft.com...
> > Hi everyone.
> > I need to create a login script that copy a lot of files from a directory
> > for other.
> > I've already done one like this but I need to make from a lot of
> > directories
> > from others.
> >
> > Here is the script that I'm using now:
> >
> > fromDir = "c:\1"
> > toDir = "c:\2"
> >
> > start = Now()
> > replaceSize = 0
> > copySize = 0
> > deleteSize = 0
> > noChangeSize = 0
> >
> > Set fso = CreateObject("Scripting.FileSystemObject")
> >
> > Set logFile = fso.OpenTextFile("Sincronizacao.log", 8, True)
> > logFile.WriteLine("")
> > logFile.WriteLine("Iniciado ................... : " & start)
> > logFile.WriteLine("Origem ..................... : " & fromDir)
> > logFile.WriteLine("Destino..................... : " & toDir)
> >
> > If fso.FolderExists(fromDir) And fso.FolderExists(toDir) Then
> > Call ReplicateDirectory(fromDir, toDir)
> > Else
> > logFile.WriteLine("Erro ...................... : Origem ou Destino
> > inalcancaveis")
> > End If
> >
> > Sub ReplicateDirectory(source, target)
> > Set targetDir = fso.GetFolder(target)
> > Set sourceDir = fso.GetFolder(source)
> > Set targetDirFileList = targetDir.Files
> > Set sourceDirFileList = sourceDir.Files
> > Set targetDirFolderList = targetDir.SubFolders
> > Set sourceDirFolderList = sourceDir.SubFolders
> > For Each targetFile in targetDirFileList
> > If fso.FileExists(source & "\" & targetFile.Name) Then
> > Set sourceFile = fso.GetFile(source & "\" & targetFile.Name)
> > If targetFile.DateLastModified <> sourceFile.DateLastModified Then
> > targetFilePath = targetDir.Path & "\" & targetFile.Name
> > 'targetFile.Delete(True)
> > replaceSize = replaceSize + sourceFile.Size
> > sourceFile.Copy targetFilePath
> > Else
> > noChangeSize = noChangeSize + sourceFile.Size
> > End If
> > Else
> > noChangeSize = noChangeSize + targetFile.Size
> > 'targetFile.Delete()
> > End If
> > Next
> > For Each sourceFile in sourceDirFileList
> > If Not fso.FileExists(target & "\" & sourceFile.Name) Then
> > copySize = copySize + sourceFile.Size
> > sourceFile.Copy targetDir.Path & "\" & sourceFile.Name
> > End If
> > Next
> > 'For Each targetFolder in targetDirFolderList
> > 'If Not fso.FolderExists(sourceDir & "\" & targetFolder.Name) Then
> > 'deleteSize = deleteSize + targetFolder.Size
> > 'targetFolder.Delete(True)
> > 'End If
> > 'Next
> > For Each sourceFolder in sourceDirFolderList
> > If Not fso.FolderExists(targetDir & "\" & sourceFolder.Name) Then
> > copySize = copySize + sourceFolder.Size
> > sourceFolder.Copy(targetDir & "\" & sourceFolder.Name)
> > Else
> > Call ReplicateDirectory(sourceFolder.Path, targetDir & "\" &
> > sourceFolder.Name)
> > End If
> > Next
> > End Sub
> >
> > finish = Now()
> >
> > logFile.WriteLine("Arquivos Identicos.......... : " & Round(noChangeSize /
> > 1024 /1024, 1) & " MB")
> > logFile.WriteLine("Arquivos Apagados........... : " & Round(deleteSize /
> > 1024 /1024, 1) & " MB")
> > logFile.WriteLine("Sincronizados............... : " & Round(replaceSize /
> > 1024 /1024, 1) & " MB")
> > logFile.WriteLine("Copiados para o Destino..... : " & Round(copySize /
> > 1024
> > /1024, 1) & " MB")
> > logFile.WriteLine("Tempo de execução........... : " & DateDiff("n", start,
> > finish) & " MIN")
> > logFile.WriteLine("Total Transferido........... : " & Round((replaceSize +
> > copySize) / 1024 / 1024, 1) & " MB")
> > logFile.WriteLine("Finalizado.................. : " & finish)
> > logFile.Close()
> >
> >
> >
> > My problem is: Need to sync a lot of Dir's with just one VBS.
> > Tnks
>
> The approach that sees simplest would be to have the list of from and to
> directories in a comma separated file (CSV). Place each pair of directory
> names, separated by a comma on each record of a text file that your script
> opens as input. Read each record, parse the from and to into fromDir and
> toDir and proceed with your current code. Do while not AtEndOfStream and
> enjoy.
>
>
>
> Hope this helps.
>
>
>

Re: Copy files by LakeGator

LakeGator
Tue Nov 08 07:35:44 CST 2005

The code to get the list of directories from a text file named
directorieslist.txt which contains the from and to directory specifications
separated by commas is:

Dim fso
Dim varDirs
Dim dirFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set dirFile = fso.OpenTextFile("directorieslist.txt", 1, False)
Do Until dirFile.AtEndOfStream
varDirs = Split(dirFile.ReadLine,",")
Call ProcessDirectory(varDirs(0), varDirs(1))
Loop
Sub ProcessDirectory(fromDir, toDir)

Place this code in place of the

fromDir = "c:\1"
toDir = "c:\2"

code, add an End Sub at the end of your existing code and move your existing
Sub ReplicateDirectory code segment to be outside the new Sub
ProcessDirectory


"Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
message news:E609CAE5-6360-4CC0-9D08-969693394491@microsoft.com...
> Hi LakeGator.....I understood your idea but I dont know how to do that.
> Could you modify this script to a new one for me ?
> Tnks
>
> "LakeGator" wrote:
>
>>
>> "Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
>> message news:ACE30CE5-2F32-44B9-8FC4-F9497CAC69F1@microsoft.com...
>> > Hi everyone.
>> > I need to create a login script that copy a lot of files from a
>> > directory
>> > for other.
>> > I've already done one like this but I need to make from a lot of
>> > directories
>> > from others.
>> >
>> > Here is the script that I'm using now:
>> >
>> > fromDir = "c:\1"
>> > toDir = "c:\2"
>> >
>> > start = Now()
>> > replaceSize = 0
>> > copySize = 0
>> > deleteSize = 0
>> > noChangeSize = 0
>> >
>> > Set fso = CreateObject("Scripting.FileSystemObject")
>> >
>> > Set logFile = fso.OpenTextFile("Sincronizacao.log", 8, True)
>> > logFile.WriteLine("")
>> > logFile.WriteLine("Iniciado ................... : " & start)
>> > logFile.WriteLine("Origem ..................... : " & fromDir)
>> > logFile.WriteLine("Destino..................... : " & toDir)
>> >
>> > If fso.FolderExists(fromDir) And fso.FolderExists(toDir) Then
>> > Call ReplicateDirectory(fromDir, toDir)
>> > Else
>> > logFile.WriteLine("Erro ...................... : Origem ou Destino
>> > inalcancaveis")
>> > End If
>> >
>> > Sub ReplicateDirectory(source, target)
>> > Set targetDir = fso.GetFolder(target)
>> > Set sourceDir = fso.GetFolder(source)
>> > Set targetDirFileList = targetDir.Files
>> > Set sourceDirFileList = sourceDir.Files
>> > Set targetDirFolderList = targetDir.SubFolders
>> > Set sourceDirFolderList = sourceDir.SubFolders
>> > For Each targetFile in targetDirFileList
>> > If fso.FileExists(source & "\" & targetFile.Name) Then
>> > Set sourceFile = fso.GetFile(source & "\" & targetFile.Name)
>> > If targetFile.DateLastModified <> sourceFile.DateLastModified Then
>> > targetFilePath = targetDir.Path & "\" & targetFile.Name
>> > 'targetFile.Delete(True)
>> > replaceSize = replaceSize + sourceFile.Size
>> > sourceFile.Copy targetFilePath
>> > Else
>> > noChangeSize = noChangeSize + sourceFile.Size
>> > End If
>> > Else
>> > noChangeSize = noChangeSize + targetFile.Size
>> > 'targetFile.Delete()
>> > End If
>> > Next
>> > For Each sourceFile in sourceDirFileList
>> > If Not fso.FileExists(target & "\" & sourceFile.Name) Then
>> > copySize = copySize + sourceFile.Size
>> > sourceFile.Copy targetDir.Path & "\" & sourceFile.Name
>> > End If
>> > Next
>> > 'For Each targetFolder in targetDirFolderList
>> > 'If Not fso.FolderExists(sourceDir & "\" & targetFolder.Name) Then
>> > 'deleteSize = deleteSize + targetFolder.Size
>> > 'targetFolder.Delete(True)
>> > 'End If
>> > 'Next
>> > For Each sourceFolder in sourceDirFolderList
>> > If Not fso.FolderExists(targetDir & "\" & sourceFolder.Name) Then
>> > copySize = copySize + sourceFolder.Size
>> > sourceFolder.Copy(targetDir & "\" & sourceFolder.Name)
>> > Else
>> > Call ReplicateDirectory(sourceFolder.Path, targetDir & "\" &
>> > sourceFolder.Name)
>> > End If
>> > Next
>> > End Sub
>> >
>> > finish = Now()
>> >
>> > logFile.WriteLine("Arquivos Identicos.......... : " &
>> > Round(noChangeSize /
>> > 1024 /1024, 1) & " MB")
>> > logFile.WriteLine("Arquivos Apagados........... : " & Round(deleteSize
>> > /
>> > 1024 /1024, 1) & " MB")
>> > logFile.WriteLine("Sincronizados............... : " & Round(replaceSize
>> > /
>> > 1024 /1024, 1) & " MB")
>> > logFile.WriteLine("Copiados para o Destino..... : " & Round(copySize /
>> > 1024
>> > /1024, 1) & " MB")
>> > logFile.WriteLine("Tempo de execução........... : " & DateDiff("n",
>> > start,
>> > finish) & " MIN")
>> > logFile.WriteLine("Total Transferido........... : " &
>> > Round((replaceSize +
>> > copySize) / 1024 / 1024, 1) & " MB")
>> > logFile.WriteLine("Finalizado.................. : " & finish)
>> > logFile.Close()
>> >
>> >
>> >
>> > My problem is: Need to sync a lot of Dir's with just one VBS.
>> > Tnks
>>
>> The approach that sees simplest would be to have the list of from and to
>> directories in a comma separated file (CSV). Place each pair of
>> directory
>> names, separated by a comma on each record of a text file that your
>> script
>> opens as input. Read each record, parse the from and to into fromDir and
>> toDir and proceed with your current code. Do while not AtEndOfStream and
>> enjoy.
>>
>>
>>
>> Hope this helps.
>>
>>
>>



Re: Copy files by ThiagoFerreira

ThiagoFerreira
Tue Nov 08 11:12:02 CST 2005

YEs!!!congratulations for you....this is what I was looking for.
Tnks

"LakeGator" wrote:

> The code to get the list of directories from a text file named
> directorieslist.txt which contains the from and to directory specifications
> separated by commas is:
>
> Dim fso
> Dim varDirs
> Dim dirFile
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set dirFile = fso.OpenTextFile("directorieslist.txt", 1, False)
> Do Until dirFile.AtEndOfStream
> varDirs = Split(dirFile.ReadLine,",")
> Call ProcessDirectory(varDirs(0), varDirs(1))
> Loop
> Sub ProcessDirectory(fromDir, toDir)
>
> Place this code in place of the
>
> fromDir = "c:\1"
> toDir = "c:\2"
>
> code, add an End Sub at the end of your existing code and move your existing
> Sub ReplicateDirectory code segment to be outside the new Sub
> ProcessDirectory
>
>
> "Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
> message news:E609CAE5-6360-4CC0-9D08-969693394491@microsoft.com...
> > Hi LakeGator.....I understood your idea but I dont know how to do that.
> > Could you modify this script to a new one for me ?
> > Tnks
> >
> > "LakeGator" wrote:
> >
> >>
> >> "Thiago Ferreira" <ThiagoFerreira@discussions.microsoft.com> wrote in
> >> message news:ACE30CE5-2F32-44B9-8FC4-F9497CAC69F1@microsoft.com...
> >> > Hi everyone.
> >> > I need to create a login script that copy a lot of files from a
> >> > directory
> >> > for other.
> >> > I've already done one like this but I need to make from a lot of
> >> > directories
> >> > from others.
> >> >
> >> > Here is the script that I'm using now:
> >> >
> >> > fromDir = "c:\1"
> >> > toDir = "c:\2"
> >> >
> >> > start = Now()
> >> > replaceSize = 0
> >> > copySize = 0
> >> > deleteSize = 0
> >> > noChangeSize = 0
> >> >
> >> > Set fso = CreateObject("Scripting.FileSystemObject")
> >> >
> >> > Set logFile = fso.OpenTextFile("Sincronizacao.log", 8, True)
> >> > logFile.WriteLine("")
> >> > logFile.WriteLine("Iniciado ................... : " & start)
> >> > logFile.WriteLine("Origem ..................... : " & fromDir)
> >> > logFile.WriteLine("Destino..................... : " & toDir)
> >> >
> >> > If fso.FolderExists(fromDir) And fso.FolderExists(toDir) Then
> >> > Call ReplicateDirectory(fromDir, toDir)
> >> > Else
> >> > logFile.WriteLine("Erro ...................... : Origem ou Destino
> >> > inalcancaveis")
> >> > End If
> >> >
> >> > Sub ReplicateDirectory(source, target)
> >> > Set targetDir = fso.GetFolder(target)
> >> > Set sourceDir = fso.GetFolder(source)
> >> > Set targetDirFileList = targetDir.Files
> >> > Set sourceDirFileList = sourceDir.Files
> >> > Set targetDirFolderList = targetDir.SubFolders
> >> > Set sourceDirFolderList = sourceDir.SubFolders
> >> > For Each targetFile in targetDirFileList
> >> > If fso.FileExists(source & "\" & targetFile.Name) Then
> >> > Set sourceFile = fso.GetFile(source & "\" & targetFile.Name)
> >> > If targetFile.DateLastModified <> sourceFile.DateLastModified Then
> >> > targetFilePath = targetDir.Path & "\" & targetFile.Name
> >> > 'targetFile.Delete(True)
> >> > replaceSize = replaceSize + sourceFile.Size
> >> > sourceFile.Copy targetFilePath
> >> > Else
> >> > noChangeSize = noChangeSize + sourceFile.Size
> >> > End If
> >> > Else
> >> > noChangeSize = noChangeSize + targetFile.Size
> >> > 'targetFile.Delete()
> >> > End If
> >> > Next
> >> > For Each sourceFile in sourceDirFileList
> >> > If Not fso.FileExists(target & "\" & sourceFile.Name) Then
> >> > copySize = copySize + sourceFile.Size
> >> > sourceFile.Copy targetDir.Path & "\" & sourceFile.Name
> >> > End If
> >> > Next
> >> > 'For Each targetFolder in targetDirFolderList
> >> > 'If Not fso.FolderExists(sourceDir & "\" & targetFolder.Name) Then
> >> > 'deleteSize = deleteSize + targetFolder.Size
> >> > 'targetFolder.Delete(True)
> >> > 'End If
> >> > 'Next
> >> > For Each sourceFolder in sourceDirFolderList
> >> > If Not fso.FolderExists(targetDir & "\" & sourceFolder.Name) Then
> >> > copySize = copySize + sourceFolder.Size
> >> > sourceFolder.Copy(targetDir & "\" & sourceFolder.Name)
> >> > Else
> >> > Call ReplicateDirectory(sourceFolder.Path, targetDir & "\" &
> >> > sourceFolder.Name)
> >> > End If
> >> > Next
> >> > End Sub
> >> >
> >> > finish = Now()
> >> >
> >> > logFile.WriteLine("Arquivos Identicos.......... : " &
> >> > Round(noChangeSize /
> >> > 1024 /1024, 1) & " MB")
> >> > logFile.WriteLine("Arquivos Apagados........... : " & Round(deleteSize
> >> > /
> >> > 1024 /1024, 1) & " MB")
> >> > logFile.WriteLine("Sincronizados............... : " & Round(replaceSize
> >> > /
> >> > 1024 /1024, 1) & " MB")
> >> > logFile.WriteLine("Copiados para o Destino..... : " & Round(copySize /
> >> > 1024
> >> > /1024, 1) & " MB")
> >> > logFile.WriteLine("Tempo de execução........... : " & DateDiff("n",
> >> > start,
> >> > finish) & " MIN")
> >> > logFile.WriteLine("Total Transferido........... : " &
> >> > Round((replaceSize +
> >> > copySize) / 1024 / 1024, 1) & " MB")
> >> > logFile.WriteLine("Finalizado.................. : " & finish)
> >> > logFile.Close()
> >> >
> >> >
> >> >
> >> > My problem is: Need to sync a lot of Dir's with just one VBS.
> >> > Tnks
> >>
> >> The approach that sees simplest would be to have the list of from and to
> >> directories in a comma separated file (CSV). Place each pair of
> >> directory
> >> names, separated by a comma on each record of a text file that your
> >> script
> >> opens as input. Read each record, parse the from and to into fromDir and
> >> toDir and proceed with your current code. Do while not AtEndOfStream and
> >> enjoy.
> >>
> >>
> >>
> >> Hope this helps.
> >>
> >>
> >>
>
>
>