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. 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. Duplicate Files In Sub-folders

    in Windows 10 Network and Sharing
    Duplicate Files In Sub-folders: Hi Experts, I have a folder with many sub folders, in every sub folder there are many files .jpg , .PDF etc.. I need to duplicate these files in same sub folders on one click. may anybody help me to resolve this problem. I shell be thankful to you experts.Thanks Regard,Faisal...
  3. Duplicate Files In Sub-folders

    in Windows 10 Gaming
    Duplicate Files In Sub-folders: Hi Experts, I have a folder with many sub folders, in every sub folder there are many files .jpg , .PDF etc.. I need to duplicate these files in same sub folders on one click. may anybody help me to resolve this problem. I shell be thankful to you experts.Thanks Regard,Faisal...
  4. Duplicate Files In Sub-folders

    in Windows 10 Software and Apps
    Duplicate Files In Sub-folders: Hi Experts, I have a folder with many sub folders, in every sub folder there are many files .jpg , .PDF etc.. I need to duplicate these files in same sub folders on one click. may anybody help me to resolve this problem. I shell be thankful to you experts.Thanks Regard,Faisal...
  5. wondershare526 folder and all its sub files

    in Windows 10 Software and Apps
    wondershare526 folder and all its sub files: why i am not allowed to delete the wondershare526 folder in the registry? i have deleted all other wondershare files from the registry. please help clarify, thank you....
  6. Moving files to a sub-folder

    in Windows 10 Network and Sharing
    Moving files to a sub-folder: When I try to move a file from a folder to a sub-folder, it puts the file in the sub-folder, but remains in the original folder also. I've gone to Windows Explorer > View > Options > View > Folders > and reset the folder options to default but that does nothing. This must...
  7. Sorting folders and the sub folders

    in Windows 10 Ask Insider
    Sorting folders and the sub folders: Hello. I have a huge music archive and recently had to format and clean install my windows 10, meanwhile I had my archive in my HDD. Now the problem is, my song folder had around 1200~ albums in it, every album in that main folder was ordered by Date and inside every album it...
  8. sub folders & sub files from personal main folder turned to Shortcut with all contents gone...

    in Windows 10 Installation and Upgrade
    sub folders & sub files from personal main folder turned to Shortcut with all contents gone...: Dear MS Expert, I've done a main folder moved (as per advice) over to OneDrive production past 2 days (Sep 11th) as backup prior to Windows 10 upgrade. I'm pretty sure all the sub folders & sub files does exist upon the move & this has been double triple etc checks the...
  9. find & remove all duplicates files, sub-folders & folders

    in Windows 10 Network and Sharing
    find & remove all duplicates files, sub-folders & folders: find & remove all duplicates files, sub-folders & folders https://answers.microsoft.com/en-us/windows/forum/all/find-remove-all-duplicates-files-sub-folders/ad64d789-7028-4873-8e1b-2605dc973305"
  10. 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...

Users found this page by searching for:

  1. powershell unblock file subdirectories

    ,
  2. powershell unblock file subfolder

    ,
  3. unblock files and subfolders in windows 2012

    ,
  4. how to unblock all files in a folder and subfolders,
  5. unblock files in sub folders