Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

How to find location of Media directory?

Sometimes the Media directory is in \Windows\Media, sometimes it is in \WINNT\Media, and possibly other places.  Is there any way to know where it is without searching?

Thanks for any ideas!

0
mistert006
Asked:
mistert006
  • 2
2 Solutions
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
There is probably a better way than this (I hope):

    Dim mediaFolder As String
    mediaFolder = Environment.GetEnvironmentVariable("windir") & "\Media"
    MsgBox("Exists: " & System.IO.File.Exists(mediaFolder), MsgBoxStyle.Information, mediaFolder)

~IM
0
 
armoghanCommented:
If you need Music folder do soemthing like this
Dim mediaFolder As String
mediaFolder =Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)

see the other options in SpecialFolder as well
0
 
armoghanCommented:
For Windows\media folder Idle_Mind's method is best one
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now