[Wapt] Syntax filescopyto

Hubert TOUVET htouvet at tranquil.it
Mon Jul 6 12:04:57 CEST 2015


filecopyto ne gère la copie que d'un fichier à la fois, pas avec les 
wildcards.


def install():
     import glob
     for fn in glob.glob('sys32/*'):
        filecopyto(fn,system32())


attention, par défaut, les redirections 32 bits sont activées.
Sur une machine 64 bits, cette instruction copiera dans C:\Windows\SysWOW64

Sinon il faut écrire :

def install():
     import glob
     with disable_file_system_redirection():
         for fn in glob.glob('sys32/*'):
             filecopyto(fn,system32())

Le 06/07/2015 11:57, Simon Fonteneau a écrit :
> BOnjour
>
>
> Je cherche a faire quelque chose comme ceci:
>
> filecopyto(makepath('sys32','*'),os.path.join(system32()))
>
> Mais il semblerai que je fasse une erreur dans la syntax?
>
> Un petit coup de main ?
>
> Simon
>
> -- 
>
>
>
> _______________________________________________
> WAPT mailing list
> WAPT at lists.tranquil.it
> http://lists.tranquil.it/listinfo/wapt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20150706/9a2884f8/attachment.html>


More information about the WAPT mailing list