Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Delete a file created and opened in IE  RSS feed

 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am creating a file using DataOutputStream.This file is then opened in IE using - 'Runtime.getRuntime()'. I want to delete this file created on closing the Explorer. How can i do this ???


Regards
Saumya
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Runtime method exec() returns a Process object. Process has a method waitFor() which returns when the external process ends. after waitFor() returns, you can delete your file.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!