BP Forums
Open a directory - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9)
+----- Thread: Open a directory (/showthread.php?tid=412)



Open a directory - brco900033 - 10-14-2011

Hello,
I was wondering on how to make a code to open a directory.
Thx


Re: Open a directory - brandonio21 - 10-14-2011

Well, it all depends on what you mean by open a directory.. If you mean in Windows Explorer, then here is the code:
Code:
Process.start("Directory here")
'For example:
Process.start("C:\Program Files\")

Hopefully this is what you needed!


Re: Open a directory - brco900033 - 10-15-2011

Yeah, that's what i ment.
Uhm, I have already another question for you. How can I delete a file, for example the file C:\Program Files\BlaBla.txt?


Re: Open a directory - brandonio21 - 10-15-2011

To delete a file, use this code!
Code:
My.Computer.Filesystem.deletefile("C:\Program Files\BlaBla.txt")



Re: Open a directory - brco900033 - 10-16-2011

Many thx!


Re: Open a directory - brandonio21 - 10-16-2011

You're very welcome!!


Re: Open a directory - chuckebaby - 11-09-2011

brandonio21 Wrote:You're very welcome!!
this is really helpful,glad to see this here.