I am making using Shell() function to run a command line tool from my VB Application.
I am using it to archive a folder. So I am using the code :
Expand|Select|Wrap|Line Numbers
- Shell("command line argument as string")
The command is properly working but when the number of files are more in the folder, then the time taken to archive is more than some milliseconds or even more than some seconds.
Now the problem is that : I FTP this file to a FTP Server. But if the time taken to archive the folder is more then my execution of code reaches the FTP part and at that time it does not fine any .ZIP file in the specified location. Thus it fails to FTP the file.
One solution to this problem is to provide some delay after calling the Shell() function. But this does not provide a guaranteed time for all cases.
So I am searching for a way that I make this Shell() function synchronous (As it is Asynchronous by default, as they say in MSDN). In MSDN they say to include an Optional argument "True" to make it synchronous, but it is not working.
I am using VB6.
Please provide me with a way for this issue.
Thanks in advance
Pawan