The process cannot access the file '.....' because it's being used by another process

C

chris

In VB6.0 I was using API calls for checking that a process has finished
and then continue with other steps:

var_process_number = Shell("wzunzip.exe -o " & """" &
fld_ZIP_file_name & """" & " " & """" & fld_import_path & """",
vbMinimizedNoFocus)

'wait until the uncompressing is over
var_process_handle = OpenProcess(&H100000, True,
var_process_number)
WaitForSingleObject var_process_handle, -1
CloseHandle var_process_handle

In ASP.NET I used:

var_process_number = Shell("""" & "\\" & My.Computer.Name &
"\wzzip.exe" & """" & " -ex " & """" & vsp_ZIP_file & """" &
vsp_ZIP_source, AppWinStyle.NormalFocus, True) 'wait is true so control
is returned to code when compress is finished

When I try to send by mail the file as attachment and then upload it on
FTP, I get the message "the process cannot access the file '.....'
because it's being used by another process".

What can i do in order to delay first process of ZIPing file +
attaching it and continue with second process of uploading it to FTP ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top