run Shell with /wait



I'm creating a cmd file I want to run with Shell which copies an existing
file, performs an operation on it which will change the file size, and then
deletes the original and saves the new file back with the old file name.
After the cmd file finishes, I want to report the length of the new file size
using FileLen.

By default, Shell executes asynchronously, which means my VBA code which
runs after the Shell statement and tries to report the length of the file
created using FileLen, fails. It reports the size of the original file.

I've tried using /wait in the cmd file which runs, but that hasn't helped.

Is there a way to make Shell Wait until the operation it started finishes,
and then proceed to the rest of the VBA code?

Thanks,

Kevin
.



Relevant Pages

  • Re: run Shell with /wait
    ... MS's ears, a diatribe to them. ... > API: Shell and Wait ... >> I'm creating a cmd file I want to run with Shell which copies an existing ... >> runs after the Shell statement and tries to report the length of the file ...
    (microsoft.public.access.modulesdaovba)
  • Re: run Shell with /wait
    ... API: Shell and Wait ... rather than allenbrowne at mvps dot org. ... > I'm creating a cmd file I want to run with Shell which copies an existing ... > runs after the Shell statement and tries to report the length of the file ...
    (microsoft.public.access.modulesdaovba)
  • Re: small black smoke/sound units
    ... I've posted a short clip of a daylight shell fired ... make great clouds of smoke .lampblack is just as messy but probably ... I have used finely powdered pigments with a flash bag burst ... good report in a siattene sized case. ...
    (rec.pyrotechnics)
  • Re: run Shell with /wait
    ... Kevin, you're very welcome to your opinion, and no offence taken. ... > MS's ears, a diatribe to them. ... >> API: Shell and Wait ... >>> runs after the Shell statement and tries to report the length of the ...
    (microsoft.public.access.modulesdaovba)
  • Re: small black smoke/sound units
    ... I've posted a short clip of a daylight shell fired ... make great clouds of smoke .lampblack is just as messy but probably ...  I have used finely powdered pigments with a flash bag burst ... good report in a siattene sized case. ...
    (rec.pyrotechnics)

Loading