![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
mikehmc
Groupie
Joined: June 17 2004 Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Topic: Determine if a Window file (Excel) is opened?Posted: August 06 2013 at 11:26am |
|
I am writing to windows, then opening the file using the external program execution. ESC STX < command CR
Works Great to write a PO to windows, and open. But I would like to delete the record if po.entry wants to modify the PO. How can I tell if a user has the file open. I have tried reading with the locked clause and do not get a lock. however, 'delete file,id' does lock. so I need to be able to deal with a lock and proceed or fail. dropping into debugger results in below. I lk.fail:188 unable to lock item '302016.CSV' in group 5309865; locked by line 65535 ! Would like to be able to determine if windows file open. thanks |
|
![]() |
|
Shrek59
Senior Member
Joined: December 04 2006 Location: New Zealand Status: Offline Points: 208 |
Post Options
Thanks(0)
Quote Reply
Posted: August 11 2013 at 8:53am |
|
This is actually a generic Windows issue rather than an AccuTerm issue. Try looking at this answer for some ideas:
http://stackoverflow.com/questions/1951791/how-to-check-if-a-file-is-already-open-by-another-process-in-c One of the answers here suggests use of the SysInternals handle utility to determine if the file is open. That will require you to execute the utility from Pick/Basic and then parse the result. Check here for that utility: http://technet.microsoft.com/en-us/sysinternals/bb896655 HTH, Brian. |
|
![]() |
|
Stefano
Newbie
Joined: October 24 2005 Location: Italy Status: Offline Points: 15 |
Post Options
Thanks(0)
Quote Reply
Posted: August 12 2013 at 10:16am |
|
Check "File Status" by Tony Gravagno @
http://nebula-rnd.com/freeware/ |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |