Hello!
I need to find some files in a directory and copy them to x folder using a VBA excel, this is possivel??
For example;
Find files that they contain xyz on is filename and for each find copy them to x folder
Thanks for your help
Júlio
Hello!
I need to find some files in a directory and copy them to x folder using a VBA excel, this is possivel??
For example;
Find files that they contain xyz on is filename and for each find copy them to x folder
Thanks for your help
Júlio
Try to use this code:
Regards,![]()
Please Login or Register to view this content.
Antonio
Originally Posted by antoka05
Obrigado amigo António
Posso pôr a questão de um ponto de vista mais prático, sou mesmo leigo nestas coisas;
A pesquisa que pretendo é multipla, isto é, tenho uma série de dados no meu sistema central (AS/400) que me identificam parcialmente o nome do ficheiro (no caso PDF) que tenho armazenado em rede numa dada directoria, e pretendia o seguinte:
Exportava para um ficheiro excel os identificadores desses ficheiros :
P.E. na celula A1 com 05780-02;05788-02;05683-02, de que forma ajustaria a macro para pesquisar os pdf`s cujo nome contivesse algum destes 3 valores?
Como comporia a string (de certeza não será com o ; como separador de valores) para mais facilmente ser lida pela macro?
Tambem é fácil para mim exportar linha a linha os valores a procurar se dessa forma simplificar o código da macro;
05780-02
05788-02
05683-02
..
..
..
Um abraço
Júlio
You can leave A1 cell as is now, with ';' separator and try to use this code:
Regards,![]()
Please Login or Register to view this content.
Antonio
Thanks António
Sorry I wrote my last post in portuguese because I thought you were from portugal (just like me).
Thanks a lot, your aid was very precious
One question more;
In the mainFolder and subfolders there are lots of files (more than 5000) to search, and the routine is very slow, you know one way to the process become faster?
Best Regards;
Júlio Mendes
Last edited by julioMendes1964; 10-30-2007 at 12:32 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks