Hiya All ![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
I wonder if you can help possibly? I am trying to run a dos control then copy the created file to a new directory. I have the shell code, and the file copy within my code but cannot seem to get the filecopy to wait for the shelled window to close.
Is the a wait function for shell that i can use to halt the code untill the dos prompt has closed?
I have attached the code that i am currently running, which gives me the "File cannot be found" error as the dos prompt is still creating it.
Many thanks in Advance!
Dim CurrentFile
CurrentFile = Right("00" & (Day(Date) - 2), 2) & Month(Date) & Right(Year(Date), 2)
Shell "wzzip p:\test\test" & CurrentFile & ".zip p:\test\test*.*"
FileCopy "p:\test\" & CurrentFile & ".zip", "s:\test\" & CurrentFile & ".zip"
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)
Adam![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
I wonder if you can help possibly? I am trying to run a dos control then copy the created file to a new directory. I have the shell code, and the file copy within my code but cannot seem to get the filecopy to wait for the shelled window to close.
Is the a wait function for shell that i can use to halt the code untill the dos prompt has closed?
I have attached the code that i am currently running, which gives me the "File cannot be found" error as the dos prompt is still creating it.
Many thanks in Advance!
Dim CurrentFile
CurrentFile = Right("00" & (Day(Date) - 2), 2) & Month(Date) & Right(Year(Date), 2)
Shell "wzzip p:\test\test" & CurrentFile & ".zip p:\test\test*.*"
FileCopy "p:\test\" & CurrentFile & ".zip", "s:\test\" & CurrentFile & ".zip"
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)
Adam
![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)