Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11438
| Newsgroups | microsoft.public.scripting.vbscript |
|---|---|
| Date | 2016-11-28 04:07 -0800 |
| References | <272535d3-23c0-44b7-bcdf-b99ede1fad18@googlegroups.com><583be929$0$21473$e4fe514c@news.xs4all.nl> <6b6acec6-bf5a-401b-b4de-86713f6d3b95@googlegroups.com><583c0ac9$0$21397$e4fe514c@news.xs4all.nl> <74a5c05c-e698-4286-ac91-6139c6b27f4e@googlegroups.com> <583c1289$0$21413$e4fe514c@news.xs4all.nl> |
| Message-ID | <0bf6b357-ef5d-4242-992d-bca114e4810a@googlegroups.com> (permalink) |
| Subject | Re: VB Script for creating zip file and copying files into it. |
| From | Chitra Balasubramani <chitrabala274@gmail.com> |
On Monday, 28 November 2016 16:49:06 UTC+5:30, R.Wieser wrote:
> Chitra,
>
> > I tired copying to normal folder, instead of zip. That worked fine.
>
> Hmmm ...
>
> There is one more thing you can try: Try changing
>
> zip.CopyHere(sourceItems)
>
> to
>
> zip.CopyHere(sourceItems.items)
>
> (the former will copy the foldername too, the latter only the files in that
> folder)
>
> If that does not work you could choose to first copy the needed files to a
> temporay folder (which you could create and remove in the script itself),
> and from there copy them into the ZIP file. Yes, I know that that is a
> work-around, but if the direct way fails you need to come up with a fix. :-)
>
> Regards,
> Rudy Wieser
>
>
> -- Origional message:
> Chitra Balasubramani <chitrabala274@gmail.com> schreef in berichtnieuws
> 74a5c05c-e698-4286-ac91-6139c6b27f4e@googlegroups.com...
> > On Monday, 28 November 2016 16:15:31 UTC+5:30, R.Wieser wrote:
> > > Chitra,
> > >
> > > > Tried adding sleep. Now getting "Access Denied Error"
> > >
> > > That seems to mean that the CopyHere is actually trying to copy some
> > > file(s). :-)
> > >
> > > I get the feeling that you get that error because one of the files in
> > > "C:\Users\chitra.balasubramani\Desktop\Mail" is still in use (is your
> mail
> > > program still running ? If so, close it before running the script).
> > >
> > > Have you tried to just copy those files to a temporary normal folder and
> see
> > > if you get the same error (using VBScript but also try drag-and-dropping
> > > them using the file/windows explorer) ?
> > >
> > > Regards,
> > > Rudy Wieser
> > >
> ...
> >
> > I tired copying to normal folder, instead of zip. That worked fine.
Wieser,
If the dest folder is "Set DestFldr=objShell.NameSpace("C:\apace-jmeter-3\bin\Results\Temp")", Copy is working.
If the dest is Set DestFldr=objShell.NameSpace("C:\apace-jmeter-3\bin\Results\outcome.zip")", getting access denied error.
Changed copyHere as "DestFldr.CopyHere (SrcFldr.Items)"
Thanks,
CHitra
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-27 22:57 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-28 09:24 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-28 02:25 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-28 11:48 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-28 02:47 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-28 12:21 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-28 04:07 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-28 17:04 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-28 20:06 -0800
Re: VB Script for creating zip file and copying files into it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-29 08:16 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-29 02:36 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-29 08:28 +0100
Re: VB Script for creating zip file and copying files into it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-11-29 08:47 +0100
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-29 08:59 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-29 01:37 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-29 11:58 +0100
Re: VB Script for creating zip file and copying files into it. Chitra Balasubramani <chitrabala274@gmail.com> - 2016-11-29 19:49 -0800
Re: VB Script for creating zip file and copying files into it. "R.Wieser" <address@not.available> - 2016-11-30 08:53 +0100
Re: VB Script for creating zip file and copying files into it. Ulrich Möller <knobbi38@arcor.de> - 2016-11-30 13:53 +0100
Re: VB Script for creating zip file and copying files into it. "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-11-29 11:56 -0500
Re: VB Script for creating zip file and copying files into it. Gloops <gloops@zailes.invalid.org.invalid> - 2016-12-19 13:40 +0100
Re: VB Script for creating zip file and copying files into it. Gloops <gloops@zailes.invalid.org.invalid> - 2016-12-19 13:42 +0100
csiph-web