Jump to content

Useful command line for Windows Powershell to unblock a whole directory of files. And a tip


kaiserxkai

Recommended Posts

dir -Path [directory path] -Recurse | Unblock-File

"This command will recurse through a directory and all sub-folders and unblock them. If you have a few files that you trust but were downloaded from the Internet, you can quickly get them all by sticking them in a folder and running that PowerShell command on them to have the stream property removed. It certainly beats the weird issues that can be caused by this setting and weird workarounds to zip the files up, unblock the zip and then extracting the files again."

 

Found this online while searching. Very useful.

 

Another useful trick:

If you wanna organize the mod folders properly and not having to rename the mod folders all the time...

- Rename the folders for the base game modules to have "00" in front of them.

 

And looking up stuff, we could make use of environmental variables to jump to folders with ease, you can create a new variable for the module folder and when unblocking you wouldn't need to type in the directory every time a new mod is added.

https://docs.oracle.com/en/database/oracle/r-enterprise/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html

 

Or someone creates a bat file in the mod folder that 'unblocks' all folders in the current directory, so you run that every time you put mod folders in...

Looking it up, you use %cd% to get current directory.

Edited by kaiserxkai
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...