Hi to everybody, I don't post a lot over here, but read you every day and have learned a lot, thanks for all the support.
I'm working in a project to backup some directory into a another one that is two or three leves under, so far I have created a solution in lisp, but I want to create a script that allows me to right click any directory or file in Windows Explorer, then check for the backup repository path, I already made some progress using the power shell but I can't figure out why it doesn't give me the right path.
Thanks in advance
This is the lisp
(setq RutaArchivos
"M:\\20150115 Proceso\\20150118 PROPUESTA CARPETAS\\NOMBREPROYECTO_AÑOMESDIA\\03-EJECUTIVO\\14-ILUMINACION"
TextoABuscar "X-ENTREGAS"
)
(BuscaEntrega RutaArchivos TextoABuscar)
(defun BuscaEntrega (RutaArchivos TextoABuscar)
(cond
((eq (strlen RutaArchivos) 3)nil) ;_Se toma en consideracion que la ruta
;_llego a la raiz c:\ o similar
((not (member TextoABuscar
(VL-DIRECTORY-FILES RutaArchivos "*" -1)
)
)
(BuscaEntrega (VL-FILENAME-DIRECTORY RutaArchivos) TextoABuscar)
)
(T (strcat RutaArchivos "\\" TextoABuscar))
)
)
And the powershell script
function Get-Entregas ($Path,$CadenaaBuscar)
{
if (-not(test-path $Path)) {Write-host " "}
elseif (-not @(get-childitem $Path -filter $CadenaaBuscar))
{Get-Entregas (split-path $Path)}
else
{
$NuevoDirectorio = $Path + '\' + $CadenaaBuscar
}
write-host $NuevoDirectorio
}
Get-Entregas $Path