Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Folder/File locking

Folder/File locking

Scheduled Pinned Locked Moved Visual Basic
csharp
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scorpion king
    wrote on last edited by
    #1

    Is there any way to lock a folder/file through VB.NET code.

    C S 2 Replies Last reply
    0
    • S scorpion king

      Is there any way to lock a folder/file through VB.NET code.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you hold a file open, then no-one else can use it. Folders, no.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • S scorpion king

        Is there any way to lock a folder/file through VB.NET code.

        S Offline
        S Offline
        scorpion king
        wrote on last edited by
        #3

        I need a kind of password protection.

        C D 2 Replies Last reply
        0
        • S scorpion king

          I need a kind of password protection.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          OK, then the answer is no. To do that, the best way I can see, is to replace the files and folders with files that are encrypted and are opened by double clicking on them via a custom file extension. There are commercial products that I believe do this, I don't see how else they could work.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          1 Reply Last reply
          0
          • S scorpion king

            I need a kind of password protection.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Other than the method Christian mentioned, there's no way to do this without rewriting the NTFS File System. Youi cannot just assign a password to a file or folder like you see in the movies.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            C 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Other than the method Christian mentioned, there's no way to do this without rewriting the NTFS File System. Youi cannot just assign a password to a file or folder like you see in the movies.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              The movies..... lied ? *sob*

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              D 1 Reply Last reply
              0
              • C Christian Graus

                The movies..... lied ? *sob*

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                Christian Graus wrote:

                The movies..... lied ? *sob*

                Or did I just lie?? ;P Hmmmm... I'll never tell! Muhahahahaaaaa

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups