How to determine if a folder is normal

Hello,
I am populating a Treeview with drives and folders. When I add nodes with folders for a given drive, I do not want any system folders, hidden folders, etc.
It is my understanding that the "Normal" attribute is assigned to folders that have no special attributes. When I run the following code (it's test code), I always get false.
    Private Sub TreeView1_NodeMouseClick(sender As Object, e As TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
        Dim att As FileAttributes
        Dim finfo As DirectoryInfo
        Dim s As String
        finfo = New DirectoryInfo(e.Node.Tag)
        att = finfo.Attributes
        s = "False"
        If att = FileAttributes.Normal Then
            s = "True"
        End If
        TextBox1.Text = e.Node.Tag + " " + s
    End Sub
How can I just get folders with no special attributes?
Thanks

A directory can have other good special attributes, such as “Compressed”, “NotContentIndexed”, etc. It also always has the “Directory” attribute.
If you want to exclude hidden, read-only and system files, then try this:
Dim is_normal As Boolean = (finfo.Attributes And (FileAttributes.Hidden Or FileAttribute.ReadOnly Or FileAttribute.System)) = 0
s = If(is_normal, "False", "True")
Since Attributes is a combination of values (flags), you cannot use just an '=' to check an attribute.

Similar Messages

  • Hello i accidentally synced all my photos from Iphoto and they doubled, i removed them all eventually to re-import them again, but i have no camera folder anymore and i have a folder called "From Mac" how can i turn it back to normal?

    hello i accidentally synced all my photos from Iphoto and they doubled, i removed them all eventually to re-import them again, but i have no camera folder anymore and i have a folder called "From Mac" how can i turn it back to normal?

    That is normal for photos synced from a computer to a phone using iTunes. Synced photos were never placed in the Camera Roll. Additionally since iOS 8 there is no Camera Roll: http://appleinsider.com/articles/14/09/19/goodbye-camera-roll-where-to-find-your -photos-in-ios-8

  • How to determine the maximum allowable length of a filename for Window ?

    Hi all,
    Could I know how to determine the allowable file length (the length of the absolute path) for a file in Window environment?
    Due to some reason, I generated a zip file with a very long filename ( > 170) and put in a folder(the length of the folder path around 90). The length of the absolute path is around 260.
    I used FileOutputStream with the ZipOutputStream to write out the zip file. Everything is working fine while i generating the zip file.
    However, while i try to extract some files from the zip file i just created, i encountered the error
    java.util.zip.ZipException The filename is too long.
    I am using the class ZipFile to extract the files from the zip file like the following
    String absPath = "A very long filepath which exceed 260";
    ZipFile zipF = new ZipFile(absPath);  //<-- here is the root causeIs it possible to pre-determine the maximum allowable filepath length prior i generate the zip file ? This is weird since i got no error while i created the zip file, but have problem in extracting the zip file ......
    Thanks

    Assuming you could determine the max, what would you do about it? I'd say you should just assume it will be successful, but accommodate (handle) the possible exception gracefully. Either way you're going to have to handle it as an "exception", whether you "catch" an actual "Exception" object and deal with that, or manually deal with the length exceeding the max.

  • When I open my Colour Picker, the middle block (which normally shows the colour in a gradient of shades) is just a solid colour depending on which H, S, B, R, G, B I have selected. How do I revert it back to normal?

    When I open my Colour Picker, the middle block (which normally shows the colour in a gradient of shades) is just a solid colour depending on which H, S, B, R, G, B I have selected. How do I revert it back to normal?

    Becky,
    It seems that  the issue is caused by a corrupt folder called en_US or similar (depending on language) within the Adobe Illustrator 18 Settings folder, see post #7 by Jules in this thread,
    https://forums.adobe.com/thread/1595766
    so the solution should be to move or rename that folder (or the whole Adobe Illustrator 18 Settings folder).
    You can find the folder in Move the folder (follow the link with that name) with Illy closed.
    As a temporary roundabout way, you can select the lower rectangle to the right of the rainbow and DoubleClick to apply that to change the top rectangle and the values: the lower colour is the right one.

  • How do you save a folder of videos on your desktop to your external hard drive?

    I'm trying to save my videos in imovie before deleting imovie, so i can then download the new imovie from the app store.
    I've moved the videos i want to save to a folder on my desktop. How do i move this folder onto my external hard drive?????

    I rarely use iMovie so I'm no expert, but the default location for movies you have created in iMovie is Home>Movies>iMovie Libary.
    Are the videos you copied earlier movies that you've created out of videos you have shot, are they just stand alone video clips that you intend to create movies from?
    I store my 'un-iMovie'd' videos in the Movies folder and then import them into iMovie to create a movie. This movie file then gets stored in the iMovie Library Folder.
    When launching iMovie the default would be for it to automatically select the iMovie Library in the Movies folder. Any projects that you've created previously would normally be located there.
    You can see what library it is using by holding down the Alt (Option) key as you launch iMovie. You can also use this method to select another library.
    Hope this answers your question as it's about the extent of my knowledge on iMovie

  • Can i know how partner determination procedure with one time cust

    hi sap gurus,
    can i know how to determine partner determination procedure
    for one time customer.
    bcz
    its creating a problem in creation of salesorder and it is saying
    that no assignment of PDP is there for your one time customer.
    help me on this
    regards,
    balaji.t
    09990019711.

    Dear Balaji,
    Only account group is differs to the onetime customer,remaining steps are same as normal customer so,
    -->First you need to maintain the nuber range to the one time customer account group as per your requirement.
    -->You need to assign the SP,BP,PY and SH partner functions to the One time customer account group in the partner determination -->Account group-Function assignment.
    I hope it will help you
    Regards,
    Murali.

  • How to determine current ORACLE XE db has been used

    I installed the BPA Architect, and it seems all right.
    during stalling process, I've choiced using XE db, but can't find any schema throug XE admin tools.
    how to determine which db is been used in Architect?

    Hi,
    Lockservice.cfg file in your config folder contains the details of Database being used by your Business Process Repository.
    Regards
    ashish

  • How do I delete a folder?

    Just so ou all new I am a brand new Mac user.
    How do I delete a folder in Leopard? I'll highlight a folder, press delete, go to file and select move to trash but it wont do anything. However if i open the folder I can delete the individual files within the folder. Its frustrating! Also every time I click on delete or move to trash it keeps asking for a password. Is there a way I can make it so it doesn't ask that each time I want to delete something?

    Normal way to delete a file/folder is: select file/folder, and command+backspace = put the selected file/folder in the bin (U can ofcause just drag the file/folder to the bin with ur mouse). Then press commandshiftbackspace to empty the bin.
    Command = apple key next to the space key
    Shift key = key to the left with arrow (for uppercase letters)
    Backspace = Same as delete key (but macbooks dont have delete, just backspace)
    AND files/folders must be unlocked to b deleted. Select a file, Press command+I, in the newly opened info-panel uncheck "locked". The selected file is now unlocked and can b deleted.
    BUT as stated elsewhere MAC OS might have a good reason not to allow deleting of systemfiles. You may damage you system if deleting systemfiles.
    As a new Mac user, make it a habbit to ask here and in other mac forums. Mac people are generally very helpfull people, thow they might tease you a bit (they have plenty humor toooo).
    And as a courtesy to those who help out - let them know if you problem was solved.
    Once a mac - u never go back...
    Best regards
    Message was edited by: Jan Storgaard
    Message was edited by: Jan Storgaard
    Message was edited by: Jan Storgaard

  • How to I get a folder to open up in Final Cut Pro version 6 thats off my desktop?

    How do I get a folder to open up in Final Cut Pro version 6.  I'm on a MAC OS X Version 10.6.8.  The movie folders I imported on my desktop from a Lacie Rugged Triple external hard drive.   When I try to import the folder a pop up comes up that says, "ERROR: No translatin templates matching the selected XML file were found.  Unable to import this file."   When I try and drag the folder into Final Cut a pop up comes up that reads "Please choose a translation document file".  What should I do or what am I not doing? 
    Cliff

    YYou should ask this question on the Final Cut Studio forum.

  • How to determine logical database in a program?

    Hello guys!
    How to determine logical database in a program on Eclipse?
    I have not found any options:
    Thanks!

    Welcome to SDN
    Check the table RSOSFIELDMAP
    Assign points if useful
    Regards
    N Ganesh

  • Anyone know how to determine Macbook Air screen tech? Causing migraines

    Hi There,
    Last year, I expereinced a lot of mild migraines which I've traced back to a new Macbook Air.
    At first I had no idea of the cause (diet, stress etc) but have noticed that my eyes feel uncomfortable looking at the screen of my Macbook Air (I don't have this issue with my Dell monitor).
    My eyes don't hurt per se, but I can detect a sublte jittering with the screen - which can turn into a migraine.
    After doing a bit of research, it seems like most (but not all) LCD and LED LCD displays use something called pulse-width modulation to control brightness but after calling Apple support, they told me my MBA doesn't use this technology.
    Does anyone know how to determine the underlaying technology in Apple displays so I can research the cauase of my headaches? I found a good Ukranian website (in english) that explained pulse-width modulation but it didn't really talk about other technologies.
    Any pointers in the right direction would be much appreciated.
    Cheers
    Ben

    What version of OS X are you using? If Yosemite, you need to update to 10.10.1 or higher.
    In any case, start by going to the editor preferences>general, clicking this button and restarting the editor:

  • How can I make a folder in the TV for my home movies

    How can I make a folder in the TV shows for my home movies collection?  I have created a folder in the library in finder and put all the videos in there but they do not appear in itunes.
    pshultz

    It's best to never move iTunes media around in Finder. Add it to the Library through the iTunes interface by dragging them into the window. Once they've been added to the library, you can try using Get Info on the files in iTunes and change the tag info to make them group together. (A unique album name should do this.) If you want them to be included with TV Shows, you can try using Get Info to set the Kind to TV Show (found under the Options tab in Get Info), but I'm not sure if it will work. Otherwise, you could make a playlist and drag them into to access them all in one convenient spot.
    If you add the items as noted above and they still do not appear in your library, it's probably because they are not a compatible format.
    Message was edited by: Diane Wordsmith

  • How to determine whether a recordset is Empty or not ?

    Please see my snippet code below :
    <%     
         String sql="";
         String username="CDS";
         try
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                Connection con = DriverManager.getConnection("jdbc:odbc:Employees","","");
                Statement stmt = con.createStatement();
                ResultSet rs=null;
                   sql = "Select * from Employee where code='" + username + "'";
                   rs = stmt.executeQuery(sql);
                   rs.next();
                   if (rs==null)
                   %>
                        <jsp:forward page="Login.jsp?msg=Username not recognized"></jsp:forward>     
                   <%     
                else
                   %>
                        <jsp:forward page="Login.jsp?msg=Halo"></jsp:forward>
                   <%
              catch(ClassNotFoundException e)
                   out.println("Driver not found");
                    catch(SQLException e2)
                            out.println(e2.getMessage());
                            out.println("<BR>");
                            out.println("Wrong SQL Statement");
                            out.println("<BR>");
                            out.println(sql);
                            out.println("<BR>");
         %>How to determine whether a recordset has no result ?
    From the above code, i use if (rs==null) and that's not worked.
    Help me, guys.

    ResultSet rs = stmt.executeQuery(sql);
    if (rs.next()) {
    %>
        <jsp:forward page="Login.jsp?msg=Halo"/>
    <%
    } else {
    %>
        <jsp:forward page="Login.jsp?msg=Username not > recognized"/>
    <%
    }

  • IMAC OSX 10.7.4 Safari why does screen suddenly change to large print etc when I cam surfing the net and how do I change it back to normal size

    Safari - Since changing from Leopard to OSX when surfing the net, my screen suddenly changes to large print/icons etc.  How do I change it back to normal.  It is driving me crazy

    That's caused by the "Smart zoom" feature of the magic mouse.  It's a Double tap with one finger to zoom and repeat to unzoom.
    You can turn the feature off if desired in System Preferences > Mouse > Point & Click tab

  • How can i change DCIM folder in my N8 belle?

    Any ideas how to change the DCIM folder? Can i make the camera save in the images and the videos folderes as it was in s3^? I really dont like the way camera saves in the DCIM, photos are mixed with videos and there is no secondery folders arrangement.

    @yzamara
    AFAIK you can't as DCIM was supposed to bring it into line with other photo taking devices.
    Happy to have helped forum with a Support Ratio = 42.5

Maybe you are looking for

  • What is the Keyboard Shortcut for Next/Previous Message in Lion Mail?

    Using the 'full screen' message viewer (rather than the preview pane) how do I progress to an older/newer message in a folder without closing the window?

  • ABAP code

    Hello Friends, Hope you all are well and doing good at your places Friends, could you please suggest me how should I go for ABAP learning. How much ABAP knowledge is required while working as BW consultant? I am working as  BW consultant from last 1.

  • Error CX_SY_CONVERSION_CODEPAGE

    Hi All, I am getting a Termination  in the ABAP program "SAPLEDI7" - in "TRANSFER_XML_TABLE"  At the conversion of a text from codepage '4102' to codepage '1100':. Can anyone have any idea about this in ECC 6.0 ?

  • Macintosh HD is damaged and can not be repaired

    I have been having problems with my MacPro Book; it had the gray with apple and wouldn't do anything. I followed the direction and now I have Macintosh HD is damaged and can not be repaired.  Is there anything I can do at this point?

  • New iMac (2014), 32GB, 256 SSD, "Unable to allocate..."

    Hello. I've been searching, but not finding, answers. I have a new iMac with 32GB RAM and a 256GB SSD. I just updated AE to 13.0 from v 12(.2?). Same problem with both versions. I'm trying to stabilize a 28 minute video. The analysis churns adequatel