Win a copy of Murach's Python Programming this week in the Jython/Python 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: 9406
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!