﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » How to determine if a folder is read-only...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 22:31:57 GMT</lastBuildDate><ttl>20</ttl><item><title>How to determine if a folder is read-only...</title><link>http://forum.strataframe.net/FindPost16094.aspx</link><description>I cant seem to figure out how to determine if a folder is read-only through VB .NET.  Any help? Thanks</description><pubDate>Mon, 05 May 2008 10:23:41 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: How to determine if a folder is read-only...</title><link>http://forum.strataframe.net/FindPost16144.aspx</link><description>Yup...Greg nailed it! :)</description><pubDate>Mon, 05 May 2008 10:23:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to determine if a folder is read-only...</title><link>http://forum.strataframe.net/FindPost16098.aspx</link><description>The attributes property is a bitwise flag, so you actually want to use something like this:&lt;br&gt;
[codesnippet]Dim myDirectory As New System.IO.DirectoryInfo("C:\TEMP")&lt;br&gt;
If (myDirectory.Attributes And System.IO.FileAttributes.ReadOnly) = System.IO.FileAttributes.ReadOnly Then&lt;br&gt;
' Add your code here.&lt;br&gt;
End If[/codesnippet]</description><pubDate>Fri, 02 May 2008 16:39:33 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to determine if a folder is read-only...</title><link>http://forum.strataframe.net/FindPost16096.aspx</link><description>Thanks!</description><pubDate>Fri, 02 May 2008 15:49:29 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: How to determine if a folder is read-only...</title><link>http://forum.strataframe.net/FindPost16095.aspx</link><description>Hi, &lt;/P&gt;&lt;P&gt;Try the following code:&lt;/P&gt;&lt;P&gt;[quote][codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Dim&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; myDirectory &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; System.IO.DirectoryInfo(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"C:\TEMP"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; myDirectory.Attributes = &lt;FONT color=#000000&gt;System.&lt;/FONT&gt;IO.FileAttributes.ReadOnly &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Add your code here.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet][/quote]</description><pubDate>Fri, 02 May 2008 15:35:46 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>