newbie: windows xp scripting

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed May 24 03:31:13 EDT 2006


Tim Roberts wrote:
> "oscartheduck" <oscartheduck at gmail.com> wrote:
> >
> >It wasn't, but after seeing your success I discovered what was wrong.
> >My destination directory didn't exist, and for some reason windows
> >wasn't automatically creating it to dump the files in.
>
> Right.  The "copy" command never creates directories.  It will copy each
> individual file, in turn, to a file with whatever the last name in the list
> is.  Not terribly useful, but it is a behavior inherited from DOS 1.
>
> On the other hand, the "xcopy" command will do it:
>
>   xcopy /i C:\DIR1 C:\DIR2
>
> That will create DIR2 if it does not already exist.

I've done a v. simple comparison of a few techniques
for copying things on Win32. Might be of some use:

http://timgolden.me.uk/python/win32_how_do_i/copy-a-file.html

TJG




More information about the Python-list mailing list