Abra un editor de texto
La función
Pega el siguiente función de VBS en el editor : .
< P > CompareAttributes función ( archivo1 , archivo2 )
dim res
si file1.attributes = file2.attributes entonces
res = true
más
res = false
final si
Compara = res
final Función
Ejemplo
Pega el siguiente para probar la función:
dim fso , f1 , f2
establecer fso = CreateObject ( " Scripting.FileSystemObject " )
conjunto f1 = fso . getFile ( "nombre de archivo " )
conjunto f2 = fso.GetFile ( " anotherFilename ")
CompareAttributes
( f1 , f2 )