Jump to content
Fórum Script Brasil
  • 0

Transferência Múltipla De Arquivos Entre Pastas


Beraldo
 Share

Question

Script postado por: Fabyo

/*Autor Fabyo guimaraes*/

Transferência Múltipla de Arquivos Entre Pastas

$pasta = 'pasta_origem';// path da sua pasta de origem

//abrir o diretório

if(!$open = @opendir($pasta)) die('O diretório não é valido!');

//ler o diretório com readdir()

while(($nome_arq = readdir($open)) !== false) {

if($nome_arq == "." or $nome_arq=="..") continue;

copy($nome_arq, "pasta_destinararia/$nome_arq");

}

Agora vou mostrar os links de todas funções usadas nesse exemplo:

IF

Opendir

While

Readdir

Copy

Continue

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649k
×
×
  • Create New...