FoxPro/Visual FoxPro - COMPARAR CARPETAS

 
Vista:

COMPARAR CARPETAS

Publicado por Gabriel (112 intervenciones) el 23/07/2007 19:36:46
HOLA AMIGOS,

TENGO UNA CONSULTA,
LO QUE SUCEDE ES QUE TENGO DOS CARPETAS

UNA CARPETA <A> CON X TABLAS

Y UNA CARPETA <B> CON X+Y TABLAS

LO QUE DESEO COMO SABER QUE TABLAS ESTAN EN 'B' Y NO EN 'A'

PARA ASI PODER CREARLAS EN 'A'
(TENGO MAS DE 50 TABLAS EN <A>)

GRACIAS POR SU AYUDA

ATENTAMENTE ---> GABRIEL
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:COMPARAR CARPETAS

Publicado por Plinio (7841 intervenciones) el 23/07/2007 21:15:59
Puedes meter las tablas de ambos folder en dos arreglos y recorrer ese arreglo e ir preguntado por FILE(). Un bosquejo
CREATE CURSOR tablas_no_estan (tabla (50))

SET DEFA TO "C:\folder_A"
ADIR(arregloA,"*.dbf")

SET DEFA TO "C:\folder_B"
ADIR(arregloB,"*.dbf")

FOR i = 1 TO ALEN(arregloB,1) &&Recorro el arreblo B
xarchivo = arregloB(i,1)
IF FILE('&xarchivo') = .T. && Si existe
INSERT INTO tablas_no_estan (tabla);
VALUE (arregloB(i,1))

ENDIF

ENDFOR

SELEC tablas_no_estan
brows
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar