Re: newbie: windows xp scripting

2006-05-24 Thread Tim Golden
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

Re: newbie: windows xp scripting

2006-05-23 Thread Tim Roberts
"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

Re: newbie: windows xp scripting

2006-05-22 Thread Larry Bates
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:

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
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

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
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

Re: newbie: windows xp scripting

2006-05-21 Thread oscartheduck
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

Re: newbie: windows xp scripting

2006-05-21 Thread Steve Holden
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: >

newbie: windows xp scripting

2006-05-21 Thread oscartheduck
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