Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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