Click here to Skip to main content
11,920,413 members (56,014 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
I have a folder contains some file are available. In that file some are opened for these files how can i close these open files.Please let me know.
Posted 20-Feb-13 2:32am
Richard MacCutchan 20-Feb-13 8:58am
What do you mean by "open"? If you have opened them in your code then you can also close them.
Sandeep Mewara 20-Feb-13 9:16am
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
ryanb31 20-Feb-13 10:35am
Are they open by a user or by you? What are you trying to do?
very ambiguous question, please rephrase. thank you

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If the file was opened by you, and assuming you use a variable named "myFile", then you should use the following code:


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 415
1 phil.o 170
2 Dave Kreskowiak 155
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,203
3 George Jonsson 2,805
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web01 | 2.8.151120.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100