943,590 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 6097
  • C# RSS
May 13th, 2009
0

open folder

Expand Post »
Hi,

how can i open and show a folder in windows using C#. like after complting some task i want the app to open the particular folder and present it to the user.

like we open any folder by double clicking on it. I want to do it the same thru code

thx
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
gallian99 is offline Offline
77 posts
since Jan 2009
May 13th, 2009
0

Re: open folder

You can use the OpenFileDialog or FolderBrowserDialog from the toolbox.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,735 posts
since Oct 2008
May 13th, 2009
0

Re: open folder

Click to Expand / Collapse  Quote originally posted by ddanbe ...
You can use the OpenFileDialog or FolderBrowserDialog from the toolbox.
i'm already using that in my program. But I couldn't figure out how I can open and show the folder to the user, not in my program and not for file selecting or browsing folders;

Ok in short this is what the program does

1. Ask the user to browse folder
2. Read all the files within the folder
3. check files for integrity
4. and then finishes

Now I want to do

5. Show the folder to the user in which the processing was done. i.e. open that folder in windows. thats it

I hope i'm clear now

thx
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
gallian99 is offline Offline
77 posts
since Jan 2009
May 13th, 2009
0

Re: open folder

You make it perfectly clear!
OpenFileDialog has a property called InitialDirectory, feed it the folder the user was browsing, is this what you want?
Or do you want to take your app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,735 posts
since Oct 2008
May 13th, 2009
0

Re: open folder

Click to Expand / Collapse  Quote originally posted by ddanbe ...
You make it perfectly clear!
OpenFileDialog has a property called InitialDirectory, feed it the folder the user was browsing, is this what you want?
Or do you want to take your app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?
Yes, I want the later case

to take my app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?

so the app can sshow the user which files in the folder were processed.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
gallian99 is offline Offline
77 posts
since Jan 2009
May 13th, 2009
0

Re: open folder

No, Danny they need to do that
System.Diagnostics.Process.Open("DirectoryPath"); C# Sample
C# Syntax (Toggle Plain Text)
  1. System.Diagnostics.Process.Open("C:\\Windows");
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
May 13th, 2009
0

Re: open folder

Thanks for pointing this out Ramy!
Did not know this.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,735 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: C# Command Prompt Reading
Next Thread in C# Forum Timeline: xml.xslt





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC