G
Guest
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
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