copy several files of a folder for other, using VBA?

Discussion in 'Microsoft Access Forms' started by Frank Dulk, Feb 20, 2005.

  1. Frank Dulk

    Frank Dulk Guest

    How do I do to copy several files of a folder for other, using VBA?
     
    Frank Dulk, Feb 20, 2005
    #1
    1. Advertisements

  2. Frank Dulk

    Paul Overway Guest

    Did you look at help for FileCopy?

    --
    Paul Overway
    Logico Solutions
    http://www.logico-solutions.com


    "Frank Dulk" <> wrote in message
    news:%23$...
    > How do I do to copy several files of a folder for other, using VBA?
    >
    >
     
    Paul Overway, Feb 20, 2005
    #2
    1. Advertisements

  3. Frank Dulk

    Frank Dulk Guest

    Did I already try but didn't I get, as it would be the code?

    "Paul Overway" <-solutions.com> escreveu na mensagem
    news:%...
    > Did you look at help for FileCopy?
    >
    > --
    > Paul Overway
    > Logico Solutions
    > http://www.logico-solutions.com
    >
    >
    > "Frank Dulk" <> wrote in message
    > news:%23$...
    > > How do I do to copy several files of a folder for other, using VBA?
    > >
    > >

    >
    >
     
    Frank Dulk, Feb 20, 2005
    #3
  4. Frank Dulk

    Paul Overway Guest

    FileCopy strSource, strDestination

    You don't understand that?

    --
    Paul Overway
    Logico Solutions
    http://www.logico-solutions.com


    "Frank Dulk" <> wrote in message
    news:%...
    > Did I already try but didn't I get, as it would be the code?
    >
    > "Paul Overway" <-solutions.com> escreveu na
    > mensagem
    > news:%...
    >> Did you look at help for FileCopy?
    >>
    >> --
    >> Paul Overway
    >> Logico Solutions
    >> http://www.logico-solutions.com
    >>
    >>
    >> "Frank Dulk" <> wrote in message
    >> news:%23$...
    >> > How do I do to copy several files of a folder for other, using VBA?
    >> >
    >> >

    >>
    >>

    >
    >
     
    Paul Overway, Feb 20, 2005
    #4
  5. Frank Dulk

    Frank Dulk Guest

    I understand.
    But as it would be to copy all the files?

    "Paul Overway" <-solutions.com> escreveu na mensagem
    news:%...
    > FileCopy strSource, strDestination
    >
    > You don't understand that?
    >
    > --
    > Paul Overway
    > Logico Solutions
    > http://www.logico-solutions.com
    >
    >
    > "Frank Dulk" <> wrote in message
    > news:%...
    > > Did I already try but didn't I get, as it would be the code?
    > >
    > > "Paul Overway" <-solutions.com> escreveu na
    > > mensagem
    > > news:%...
    > >> Did you look at help for FileCopy?
    > >>
    > >> --
    > >> Paul Overway
    > >> Logico Solutions
    > >> http://www.logico-solutions.com
    > >>
    > >>
    > >> "Frank Dulk" <> wrote in message
    > >> news:%23$...
    > >> > How do I do to copy several files of a folder for other, using VBA?
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Frank Dulk, Feb 20, 2005
    #5
  6. You have to copy them one-by-one. If you're wanting to copy all files
    matching a particular pattern, use the Dir function to determine the files.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)



    "Frank Dulk" <> wrote in message
    news:%...
    >I understand.
    > But as it would be to copy all the files?
    >
    > "Paul Overway" <-solutions.com> escreveu na
    > mensagem
    > news:%...
    >> FileCopy strSource, strDestination
    >>
    >> You don't understand that?
    >>
    >> --
    >> Paul Overway
    >> Logico Solutions
    >> http://www.logico-solutions.com
    >>
    >>
    >> "Frank Dulk" <> wrote in message
    >> news:%...
    >> > Did I already try but didn't I get, as it would be the code?
    >> >
    >> > "Paul Overway" <-solutions.com> escreveu na
    >> > mensagem
    >> > news:%...
    >> >> Did you look at help for FileCopy?
    >> >>
    >> >> --
    >> >> Paul Overway
    >> >> Logico Solutions
    >> >> http://www.logico-solutions.com
    >> >>
    >> >>
    >> >> "Frank Dulk" <> wrote in message
    >> >> news:%23$...
    >> >> > How do I do to copy several files of a folder for other, using VBA?
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Douglas J. Steele, Feb 20, 2005
    #6
  7. Frank Dulk

    Frank Dulk Guest

    They are files *.XLS

    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> escreveu na mensagem
    news:...
    > You have to copy them one-by-one. If you're wanting to copy all files
    > matching a particular pattern, use the Dir function to determine the

    files.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    >
    > "Frank Dulk" <> wrote in message
    > news:%...
    > >I understand.
    > > But as it would be to copy all the files?
    > >
    > > "Paul Overway" <-solutions.com> escreveu na
    > > mensagem
    > > news:%...
    > >> FileCopy strSource, strDestination
    > >>
    > >> You don't understand that?
    > >>
    > >> --
    > >> Paul Overway
    > >> Logico Solutions
    > >> http://www.logico-solutions.com
    > >>
    > >>
    > >> "Frank Dulk" <> wrote in message
    > >> news:%...
    > >> > Did I already try but didn't I get, as it would be the code?
    > >> >
    > >> > "Paul Overway" <-solutions.com> escreveu na
    > >> > mensagem
    > >> > news:%...
    > >> >> Did you look at help for FileCopy?
    > >> >>
    > >> >> --
    > >> >> Paul Overway
    > >> >> Logico Solutions
    > >> >> http://www.logico-solutions.com
    > >> >>
    > >> >>
    > >> >> "Frank Dulk" <> wrote in message
    > >> >> news:%23$...
    > >> >> > How do I do to copy several files of a folder for other, using

    VBA?
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Frank Dulk, Feb 20, 2005
    #7
  8. Dim strDestinationFolder As String
    Dim strSourceFolder As String
    Dim strFile As String

    strDestinationFolder = "C:\Another Folder\"
    strSourceFolder = "C:\My Data\"

    strFile = Dir$(strSourceFolder & "*.XLS")
    Do While Len(strFile) > 0
    FileCopy strSourceFolder & strFile, strDestinationFolder & strFile
    strFile = Dir$()
    Loop


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)



    "Frank Dulk" <> wrote in message
    news:%...
    > They are files *.XLS
    >
    > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> escreveu na
    > mensagem
    > news:...
    >> You have to copy them one-by-one. If you're wanting to copy all files
    >> matching a particular pattern, use the Dir function to determine the

    > files.
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >>
    >> "Frank Dulk" <> wrote in message
    >> news:%...
    >> >I understand.
    >> > But as it would be to copy all the files?
    >> >
    >> > "Paul Overway" <-solutions.com> escreveu na
    >> > mensagem
    >> > news:%...
    >> >> FileCopy strSource, strDestination
    >> >>
    >> >> You don't understand that?
    >> >>
    >> >> --
    >> >> Paul Overway
    >> >> Logico Solutions
    >> >> http://www.logico-solutions.com
    >> >>
    >> >>
    >> >> "Frank Dulk" <> wrote in message
    >> >> news:%...
    >> >> > Did I already try but didn't I get, as it would be the code?
    >> >> >
    >> >> > "Paul Overway" <-solutions.com> escreveu na
    >> >> > mensagem
    >> >> > news:%...
    >> >> >> Did you look at help for FileCopy?
    >> >> >>
    >> >> >> --
    >> >> >> Paul Overway
    >> >> >> Logico Solutions
    >> >> >> http://www.logico-solutions.com
    >> >> >>
    >> >> >>
    >> >> >> "Frank Dulk" <> wrote in message
    >> >> >> news:%23$...
    >> >> >> > How do I do to copy several files of a folder for other, using

    > VBA?
    >> >> >> >
    >> >> >> >
    >> >> >>
    >> >> >>
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Douglas J. Steele, Feb 21, 2005
    #8
  9. Frank Dulk

    Frank Dulk Guest

    Thank you very much.


    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> escreveu na mensagem
    news:%...
    > Dim strDestinationFolder As String
    > Dim strSourceFolder As String
    > Dim strFile As String
    >
    > strDestinationFolder = "C:\Another Folder\"
    > strSourceFolder = "C:\My Data\"
    >
    > strFile = Dir$(strSourceFolder & "*.XLS")
    > Do While Len(strFile) > 0
    > FileCopy strSourceFolder & strFile, strDestinationFolder & strFile
    > strFile = Dir$()
    > Loop
    >
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    >
    > "Frank Dulk" <> wrote in message
    > news:%...
    > > They are files *.XLS
    > >
    > > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> escreveu na
    > > mensagem
    > > news:...
    > >> You have to copy them one-by-one. If you're wanting to copy all files
    > >> matching a particular pattern, use the Dir function to determine the

    > > files.
    > >>
    > >> --
    > >> Doug Steele, Microsoft Access MVP
    > >> http://I.Am/DougSteele
    > >> (no e-mails, please!)
    > >>
    > >>
    > >>
    > >> "Frank Dulk" <> wrote in message
    > >> news:%...
    > >> >I understand.
    > >> > But as it would be to copy all the files?
    > >> >
    > >> > "Paul Overway" <-solutions.com> escreveu na
    > >> > mensagem
    > >> > news:%...
    > >> >> FileCopy strSource, strDestination
    > >> >>
    > >> >> You don't understand that?
    > >> >>
    > >> >> --
    > >> >> Paul Overway
    > >> >> Logico Solutions
    > >> >> http://www.logico-solutions.com
    > >> >>
    > >> >>
    > >> >> "Frank Dulk" <> wrote in message
    > >> >> news:%...
    > >> >> > Did I already try but didn't I get, as it would be the code?
    > >> >> >
    > >> >> > "Paul Overway" <-solutions.com> escreveu na


    > >> >> > mensagem
    > >> >> > news:%...
    > >> >> >> Did you look at help for FileCopy?
    > >> >> >>
    > >> >> >> --
    > >> >> >> Paul Overway
    > >> >> >> Logico Solutions
    > >> >> >> http://www.logico-solutions.com
    > >> >> >>
    > >> >> >>
    > >> >> >> "Frank Dulk" <> wrote in message
    > >> >> >> news:%23$...
    > >> >> >> > How do I do to copy several files of a folder for other, using

    > > VBA?
    > >> >> >> >
    > >> >> >> >
    > >> >> >>
    > >> >> >>
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Frank Dulk, Feb 22, 2005
    #9
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    disable field until several other fields filled

    Guest, Oct 1, 2004, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    410
    Guest
    Oct 1, 2004
  2. Guest
    Replies:
    5
    Views:
    169
    Guest
    Feb 16, 2005
  3. Guest
    Replies:
    1
    Views:
    198
    Jeff Boyce
    Jun 21, 2007
  4. Dorian C. Chalom

    create folder/copy file to folder

    Dorian C. Chalom, Aug 10, 2008, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    177
    Douglas J. Steele
    Aug 11, 2008
  5. Frank Situmorang

    VBA to copy file from a folder to the other

    Frank Situmorang, Jan 27, 2009, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    521
    Frank Situmorang
    Jan 27, 2009
Loading...

Share This Page