Windows 10: Trying to unblock all files in folder/sub-folders with Powershell

Discus and support Trying to unblock all files in folder/sub-folders with Powershell in Windows 10 Support to solve the problem; Well, I'm not having success accomplishing what apparently is supposed to be possible using Powershell. I'm running Win10 1803 and Powershell is Major... Discussion in 'Windows 10 Support' started by DSperber, Sep 10, 2018.

  1. DSperber Win User

    Trying to unblock all files in folder/sub-folders with Powershell


    Well, I'm not having success accomplishing what apparently is supposed to be possible using Powershell. I'm running Win10 1803 and Powershell is Major 5, so the "unblock-file" feature is definitely available.

    I have recently discovered that I have a number of assorted folders (with sub-folders and files underneath each) that apparently has the security "this file came from another computer..." flag on in an unknown number of files. I'm trying to synchronize these folders to a second "master version" and this requires the ability to delete "orphans" or older versions from one side in order to "mirror" the files on the other side.

    Normally, simply manually checking the "unblock" box on Properties for the file and then pushing OK would accomplish the goal one file at a time, except that with potentially hundreds of files in any number of sub-folders this is a daunting task. And besides, this is precisely the kind of job that the Powershell UNBLOCK-FILE function was invented for.

    So, apparently it's supposedly very simple to do, in a single Powershell command:

    dir "c:\mydir" -Recurse | Unblock-File

    Alternatively this second equivalent command is also supposed to work:

    get-childitem "c:\mydir" -recurse | unblock-file

    I've tried both commands, but neither one is 100% succeeding. Neither of these is actually successfully unblocking ALL of the files in ALL of the sub-folders under c:\mydir.

    Without actually knowing in advance which of each and every file started by having its blocked flag on to begin with so that I could confirm that the Powershell commands actually were or were not accomplishing anything at all (i.e. that after the command the blocked flag had now been removed), I can't determine if there is some pattern to the failure. But there's no doubt that when I look at assorted files in the tree structure after the commands have run, that quite a number of files have obviously never been touched and corrected.

    Why not???

    :)
     
    DSperber, Sep 10, 2018
    #1
  2. Vanessa Yar Win User

    sub folders

    Hi Paulette,

    You can move the sub-folder by dragging the sub-folder from the other Picture Folder up to the main Picture Folder. However, the sub-folder will remain as a sub-folder.

    If you want to make the sub-folder as a stand alone folder, we suggest that you create a new folder on your desired location, then move over the files from the sub-folder to the new folder that you created.

    Let us know if you need further assistance.

    Regards.
     
    Vanessa Yar, Sep 10, 2018
    #2
  3. Arul_D Win User
    sub Folder for outlook

    Hello,

    Thank you for writing your query in Microsoft Community. I would like to have some more understanding to the issue so that we can diagnose and work on the issue faster. Kindly provide me the following information:


    • Where are you trying to create a sub folder is it on mail app or other application?
    If it is mail app, unfortunately there is no option to create a sub folder in Mail app, I would suggest you to share your feedback in Windows Feedback app.
     
    Arul_D, Sep 10, 2018
    #3
  4. Frogger Win User

    Trying to unblock all files in folder/sub-folders with Powershell

    ?? How do I PW protect Folders in windows

    hmmm?
    Sharing files and folders overview You can share the files and folders stored on your computer, on a network, and on the Web. The method you choose depends on whom you want to share files with, and what computer they will use to access the files.

    When you share files or folders, they are not as protected as they are when you do not share them. People with access to your computer or your network might be able to read, copy, or change files that are in a shared folder. You should always be aware that the files and folders that you share are available to other people and be sure to monitor your shared files and folders on a regular basis.

    Important

    If your computer is not joined to a domain, you can use the Network Setup Wizard to automatically turn file and printer sharing on or off. To start the Network Setup Wizard, click Start, click Control Panel, click Network and Internet Connections, and then click Network Setup Wizard.
    If you both use the same computer

    You can put the files you want to share in the Shared Documents folder. Files stored in the Shared Documents folder or its subfolders are always available to other users on your computer.

    Step-by-step procedure
    Note

    If you are connected to a network domain, the Shared Documents, Shared Pictures, and Shared Music folders are not available.
    If both computers are on the same network

    You can share a folder or drive on your computer with others on the network. You can also control whether the files in the shared folder can be modified by other users.

    If your computer is connected to a network domain, use this procedure:

    Step-by-step procedure
    If your computer is connected to a workgroup, use this procedure:

    Step-by-step procedure
    Note

    If you are connected to a network domain, you will need to set the Access control for the folder or drive after sharing it. For more information, go to To set, view, change, or remove file and folder permissions.
    If you want to share your files online

    You can publish pictures and documents on the Web using the Web Publishing Wizard. The files will be stored in a private, online folder that you manage.

    Step-by-step procedure

    If you don't want others to access your files

    You can prevent other users from accessing your folders and the files they contain. When your computer is connected to a domain, this is called setting permissions for your file or folder. When your computer is connected to a workgroup, this is called making your folders private.

    If your computer is connected to a network domain, use this procedure:

    Step-by-step procedure
    If your computer is connected to a workgroup, use this procedure:

    Step-by-step procedure

    'HELP' it can be your friend *Smile Trying to unblock all files in folder/sub-folders with Powershell :)
     
    Frogger, Sep 10, 2018
    #4
Thema:

Trying to unblock all files in folder/sub-folders with Powershell

Loading...
  1. Trying to unblock all files in folder/sub-folders with Powershell - Similar Threads - Trying unblock files

  2. Sub folder appearing and disappering.

    in Windows 10 Support
    Sub folder appearing and disappering.: I am using windows 10 in my dell laptop.when I am trying to open one sun folder,it appears and immediately it disappears.I am unable to use it.can any one help me please,thanks in advance.I need that sub folder . Bijoy 117564
  3. Why are all my sub folders showing empty

    in Windows 10 Customization
    Why are all my sub folders showing empty: Why are all my sub folders showing empty, I need a proper answer, as all my items are in these folders I really need to get them back https://answers.microsoft.com/en-us/windows/forum/windows_10-start/why-are-all-my-sub-folders-showing-empty/a90c7ef5-ec57-4965-8980-0f98742be897
  4. Background screen NOT from sub folders.

    in Windows 10 Customization
    Background screen NOT from sub folders.: Hello, I've noticed that while with Vista you could choose as a background screen the folder Pictures and the slideshow would includes all the sub folders as well, now you can choose only a specific folder ( if you choose Pictures and it contains only sub folders the screen...
  5. Changing Folder Sub-name?

    in Windows 10 Customization
    Changing Folder Sub-name?: Ok so I'm a bit of a neat freak? I like to keep things in the right places so I went ahead and created a folder called Software which will keep all of my programs like AIDA64 or Precision X etc.. I was able to get it so that it would show under "This PC"...
  6. Find number of folders in every sub-folder

    in Windows 10 Support
    Find number of folders in every sub-folder: This is not exactly Windows questions. I wasn't too sure where to post, hence posting here. Admins, feel free to move to appropriate forum. Here is the task, I have 'C:\Data' folder that contains 1000s of folders. Each Subfolder should ideally contain one child folder in...
  7. Shift+Delete corrupt sub-folders

    in Windows 10 Support
    Shift+Delete corrupt sub-folders: Hello, when i delete a folder with x amount of files in it, the files get deleted but the folders stay. when i click on them i get error: location is not available "Path" Access is denied and they cant be deleted. any help is appreciated! 87598
  8. Setting folder and sub-folders properties in file explorer

    in Windows 10 Support
    Setting folder and sub-folders properties in file explorer: Hello, In the file explorer I have folders with pictures, music and videos. Each type is stores in a separate main folder and under it subfolders. In the main folder properties I customize it what columns I want to see, then I click to set the same to all subfolders, click...
  9. How to add a new column to the Pictures folder and all sub-folders?

    in Windows 10 Support
    How to add a new column to the Pictures folder and all sub-folders?: I have a lot of pictures of my granddaughter taken by my camera, my daughter’s camera & phone, and my son-in-law’s phone at the same place and time. For example, we were all at Disney World at the same time. I would like to add the “Camera model” to all Details views to...
  10. Libraries View set to a folder will not apply to all it's sub folders

    in Windows 10 Support
    Libraries View set to a folder will not apply to all it's sub folders: So, as suggested by Brink, I started a new thread for this issue. Brink you stated ''Just to note, that folders in a library share the same folder view as it was when last closed. This isn't the same as the folders in "This PC". Yes, this is (supposed to be) true...