Tim Roberts wrote:
> "oscartheduck" <[EMAIL PROTECTED]> 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
"oscartheduck" <[EMAIL PROTECTED]> 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 w
oscartheduck wrote:
> For completeness' sake, this is the new script I came up with:
>
> import os
>
> dirfrom = 'C:\\test'
> dirto = 'C:\\test1\\'
> makedir = 'mkdir "%s"' % dirto
> copy_command = 'copy "%s" "%s"' % (dirfrom, dirto)
>
> if os.system(copy_command) == 0:
> print "yay"
> else:
For completeness' sake, this is the new script I came up with:
import os
dirfrom = 'C:\\test'
dirto = 'C:\\test1\\'
makedir = 'mkdir "%s"' % dirto
copy_command = 'copy "%s" "%s"' % (dirfrom, dirto)
if os.system(copy_command) == 0:
print "yay"
else:
if os.system(makedir) == 0:
if
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.
I could fix this with a nested if statement, but it "feels" like
windows should be creating this folder au
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.
I could fix this with a nested if statement, but it "feels" like
windows should be creating this folder au
oscartheduck wrote:
> I've been having trouble with the following style of script. It's
> simple stuff, I know, but it's stumping me:
>
> import os
>
> dirfrom = 'C:\\test'
> dirto = 'C:\\test1\\'
>
> copy_command = 'copy "%s" "%s"' % (dirfrom, dirto)
>
> if os.system(copy_command) == 0:
>
I've been having trouble with the following style of script. It's
simple stuff, I know, but it's stumping me:
import os
dirfrom = 'C:\\test'
dirto = 'C:\\test1\\'
copy_command = 'copy "%s" "%s"' % (dirfrom, dirto)
if os.system(copy_command) == 0:
print "yay"
else:
print "boo"
What's g