0
Answer

how to read audio file from lock folder of the system in c#

sumit kumar

sumit kumar

8y
402
1
 *-- Code to lock the folder 
DirectoryInfo d = new DirectoryInfo(folderDialog.SelectedPath);
try
{
string selectedpath = d.Parent.FullName + d.Name;
if (folderDialog.SelectedPath.LastIndexOf(".{") == -1)// if folder is unlock
{
//if (checkBox1.Checked)
//setpassword(folderBrowserDialog1.SelectedPath); // password not required to lock the folder
if (!d.Root.Equals(d.Parent.FullName))
d.MoveTo(d.Parent.FullName + "\\" + d.Name + _lockKey);
else d.MoveTo(d.Parent.FullName + d.Name + _lockKey);
tb_SlctFldr.Text = folderDialog.SelectedPath;
// pictureBox1.Image = Image.FromFile(Application.StartupPath + "\\lock.jpg");
}
 
 
now folder is locked, how can i read the file from locked folder without unlocking folder