Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

copiar archivos a otras carpetas

publicado
En 2/1/2024 at 18:40 , Israel Cassales dijo:

Para finalizar mi participación en esta consulta y consideras aún usar Excel, te paso una macro que cumple con lo que solicitas en tu libro:

Sub CopiarArchivos()
    Dim ws As Worksheet
    Dim srcPath As Range
    Dim destPath As Range
    Dim file As Variant
    Dim dest As Variant
    Set ws = ThisWorkbook.Sheets("Hoja1")
    Set srcPath = ws.Range("B4:B11")
    Set destPath = ws.Range("F4:F11")
    For Each file In srcPath
        If file.Value <> "" Then
            For Each dest In destPath
                If dest.Value <> "" Then
                    FileCopy file.Value, dest.Value & "\" & Dir(file.Value)
                End If
            Next dest
        End If
    Next file
End Sub

En ese código solo estoy validando que no haya celdas vacías en los rangos que proporcionaste, pero no estoy manejando qué hacer si surgen otros tipos de errores, éstos los debes de anticipar con lo que te he descrito anteriormente.

Saludines

 

Buenas tardes.

Y si en lugar de copiar todos los ficheros en las rutas indicadas, fuera un fichero, una ruta.

Es decir, el fichero de la b4, copiarlo en la ruta del f5, el fichero de la b5, copiarlo en la ruta del f6.

Puedes ayudarme ?

Muchas gracias por tu tiempo y ayuda !!!

 

Featured Replies

publicado
  • Autor

Hola @Abraham Valencia

Ya he contestado por el otro foro.

Por aquí, lo único que puedo decir es  ... gracias por tu tiempo !

Un saludo.

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.