Answered by:
Unblock files (Batch Process)
-
Hey everyone!
Ok, got a little challenge here, and haven't found a viable answer yet. Here it is:
When you download say a .zip file from the internet, or another computer, it puts a "block" file security attribute on it. So if you don't right click on the zip, click properties, and click unblock - when you unzip it without removing that, all of the files in that zip will carry that "block" file attribute.
So, here's the problem. I have about 15gb of zip files, that I've extracted and put the files and folders, in multiple places on my HDD. Furthermore, I have made modifications to some of those files. We're talking about too many files, to try and track down, right click on each one and unblock it, one by one.
I'm looking for a batch process that will search through and unblock an entire file hierarchy. So not only do the following: Actions:(right click file; click properties, click unblock, click ok) but can search through an entire file structure and attempt the same action if necessary.
Now, the trick is, the file search. If the batch process doesn't recognize if a file is already unblocked, I want to make sure that it's not going to foul the process in some way. However, if the process just stopped and had to be restarted again when that happened, I would be ok with that.
Let me know what you geniuses figure out, because unfortunately I'm not that smart, or I wouldn't be in this predicament. :D
Thanks for your time,
~S
Question
Answers
-
http://forums.techarena.in/windows-security/476912.htm#post2842749
"The file was downloaded using IE and has retained the Internet Zone data in an NTFS alternate data stream."
"You can get around #2 by removing the alternate data stream using SysInternals streams utility with the -d option - "streams -d""- Proposed as answer by mbrownnyc Friday, September 11, 2009 4:11 PM
- Marked as answer by Cadillac Shane Sunday, September 13, 2009 7:50 PM
- Edited by Ronnie VernonMVP, Moderator Wednesday, February 01, 2012 8:57 AM edit
-
use both switches ( streams -s -d whateverpathway )
- Marked as answer by Cadillac Shane Sunday, September 13, 2009 8:49 PM
All replies
-
http://forums.techarena.in/windows-security/476912.htm#post2842749
"The file was downloaded using IE and has retained the Internet Zone data in an NTFS alternate data stream."
"You can get around #2 by removing the alternate data stream using SysInternals streams utility with the -d option - "streams -d""- Proposed as answer by mbrownnyc Friday, September 11, 2009 4:11 PM
- Marked as answer by Cadillac Shane Sunday, September 13, 2009 7:50 PM
- Edited by Ronnie VernonMVP, Moderator Wednesday, February 01, 2012 8:57 AM edit
-
Hey,
Wanted to tell you that information is great! Now, after installing "streams" I have not been able to open a command prompt and get streams to function. I think that will work, but I need someone to hold my hand, because I can't get it to do anything.
Opened streams.exe. Installed it. Tried to click on it again, and it just brings up a flash cmd prompt and disappears.
Tried to open cmd prompt and follow the instructions on the "found this" link, and I can't seem to enter in a folder and have it do anything. I simply get the "unrecognized command" in the line.
Let me know if any of that doesn't make any sense, and I think we're on our way to a solution so far!
-
You have to run streams FROM the command prompt. In the command you have to input the pathway to the "streams" utilty. if you want to do it the lazy way, when you open the CMD have the streams utilty on your desktop and just drag and drop it in the command prompt. the CMD will pick up the pathway then. but, that one can ONLY be run from the CMD prompt
-
also, if you plan on using it real often, you probably wont to put it in the root folder that the CMD opens to. whenever you open command prompt, look at the root folder that it lists there, then with navigate to that folder and put it there. that way when you open the command prompt all you have to do is type in "streams" without the qoutes. if this helps your problem, please mark mbrownnyc 's response as answered, that will help others looking for answers find the posts with solutions
-
-
Ok, so I have the cmd prompt up:
it has C:\Documents and Settings\myUser>
I typed in streams -d then drag and dropped the file folder into the cmd prompt, so it looks like this:
streams -d"C:\Program Files\My Selected Program Folder"
I clicked enter, and it brought up the "Streams v1.56 app information" and then below stated "No Files with streams found"
I tried the same routine but with the -s option, and received the same response.
Let me know what I'm missin!
P.S. thanks for helping someone who has no idea what this is doing! :D -
-
yes, agian you have to put the pathway in, and if you have a problem with that, just do what I recommended on the first, navigate to the folder that your using it on, then drag and drop in the command prompt, then the CMD will pick up the pathway on its own automatically ( streams -d pathwithfilename ) and if you have probems remembering the commands, just type "streams/?" and that will list both command options for it
-
I hope this helps and takes care of the problem
- Proposed as answer by securityguy14 Sunday, September 13, 2009 8:07 PM
-
Well, back to square one. I've gone through several of the file folders where the blocked files are stored, after using the "streams -s "file folder path" function.
I've started going through the files, and they are still carrying the "Security: This file came from another computer and might be blocked to help protect this computer" and still has the unblock button.
Let me know, what we can try next -
-
-
-
-
-
use both switches ( streams -s -d whateverpathway )
- Marked as answer by Cadillac Shane Sunday, September 13, 2009 8:49 PM
-
-
PERFECT! worked with windows7.
After coping it from the zip folder and pasting it into the c: drive.
Went to RUN above the shut down button and typed cmd.
Got the C:\Documents and Settings\myUser>
After that put c:\streams.exe
It gives you the directions.
Input.....c:\streams.exe -s -d c:\ExampleFolder\ ENTER
ty to everyones help and the program creator.
even though it says delete streams, it didn't delete any files that i can tell.
Windows Live mesenger me with programing answers -
-
Easy solution using PowerShell
Get-ChildItem <path to your folder> -recurse | Unblock-File
<path to your folder> path to your folder , for example for myfolder in c drive C:\myfolder
Get-ChildItem C:\myfolder -recurse | Unblock-File
The -recurse parameter will include all subfolders and files.
P. Velachoutakos
-