S
S
sur-pavel2020-05-22 19:31:55
C++ / C#
sur-pavel, 2020-05-22 19:31:55

How to move pdf open in webbrowser?

I open the next file, do move () - it falls out with IOException "the resource is occupied by another process.

files = new DirectoryInfo(path).GetFiles("*.pdf");
webBrowser1.Navigate(files[0].Current.FullName); 
webBrowser1.Navigate(files[1].Current.FullName);
File.Move(currentFileInfo.FullName, outputFile);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-05-22
@sur-pavel

No way, copy the file and wait for the browser to close to delete the remaining file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question