Delete multiple Alternate Datastreams

Aug 3, 2016
376
9
Netherlands
If you run a downloaded executable, you get a warning like this:

2016-12-30 17_55_59-Open File - Security Warning.png


Disable this warning by unchecking the "Always ask ..." checkbox .OR. ....
Unblock the file in the filemanager:

2016-12-30 17_57_14-tcclex64.exe Properties.png



OR (and that's the reason I ask): removing the Zone.Identifier alternate datastream like this:

Code:
del Kerstpuzzel+2016.pdf:Zone.Identifier

I have 2 download locations and (un) regularly remove all the Zone.Identifier filestreams.
This can be done with something like: for %var in (*) do del %var:Zone.Identifier

But this doesn't work:
Code:
del *:Zone.Identifier.

Anyone knows what's going on?
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
Two things going wrong here:

1) The Windows find files APIs don't support wildcard searches for matching stream names
2) But they won't even reach #1 because they think you're trying to specify a wildcard drive name

I might be able to kludge up some kind of support for this in TCC (at considerable effort), but nobody's ever asked for it.
 
Aug 3, 2016
376
9
Netherlands
Two things going wrong here:
[...]
I might be able to kludge up some kind of support for this in TCC (at considerable effort), but nobody's ever asked for it.

In that case: neither will I. It's just a little less intuitive, but the for-loop will suffice.


P.S. Now I feel really stupid: I tell "everyone" to read carefully what the error message *really* says, because most of the times that is half of the solution.
In this case the error message is:
Code:
TCC: (Sys) The system cannot find the drive specified.
 "*:"

I could/should have known. Please don't tell "everyone" :-)

BTW Regarding 1): the wildcard search isn't in the stream part, but in the filename part. Or is this the same to the API's?
 

samintz

Scott Mintz
May 20, 2008
1,511
18
Solon, OH, USA
Create an alias and use it so you don't have to type out the full command each time:
Code:
alias UnBlock=do f in %%1 (del %%f:Zone.Identifier)

UnBlock *
UnBlock Kerstpuzzel+2016.pdf
 
  • Like
Reactions: Juppycmd
Aug 3, 2016
376
9
Netherlands
Create an alias and use it so you don't have to type out the full command each time

I already have a .btm script in place (as it's only 2 fixed folders) to do the same.
I did rename it to _Unblock.btm, though as this is a far better name than my own _DelZone.btm (thanks for this suggestion!).
 
Similar threads
Thread starter Title Forum Replies Date
A Installers delete EVerything service if already installed Support 0
Chen Touboul When i try to delete an empty folder i got "the dirctoy name is invalid" Support 3
I zip /M fails to delete file after adding to zip file Support 2
D SYNC /W copies back instead of propagating a delete Support 2
D safe delete files command Support 10
P How to? Delete subfolders but not the folder itself Support 11
P Can't do something to a file and then delete it? Support 6
nickles WAD del unable to delete files ending in "." Support 18
gschizas Fixed Cannot use extended path to delete invalid file Support 3
M Can't delete files... Support 8
aedthuio REG ADD/DELETE Support 1
vefatica Cut/delete Support 3
D TCMD16 Delete Toolbar Button bug Support 7
G FOLDERMONITOR created also firing for delete (and maybe other events) Support 7
T How to? Select and Delete text Support 6
Joe Caverly How to? Delete a line from a file Support 4
CWBillow Delete based on dates Support 5
JohnQSmith How to? Delete descriptions Support 2
vefatica How do I delete "spaces.txt "? Support 21
A How to? Instruct COPY to delete file if only partially copied (via FTP) Support 8
M Why am I unable to delete files? Support 8
R Delete command sets directory attributes to hidden & system Support 46
S 4NT - delete from command prompt and recycle bin Support 12
Phileosophos COPY /W does not delete files in the target Support 4
T Possible to delete the new standard tab? Support 1
P Sync /w won't delete in ftp folder Support 1
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
N Unable to bind multiple keys to the same key mapping directive Support 9
vefatica Console not redrawn in BTM or with multiple commands Support 4
C duplicate files in multiple plugin sites Support 9
kb6ojs ALIAS with multiple commands? Support 9
vefatica How do I do this with a multiple-line DO? Support 7
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
R How to? Append files in multiple subfolders using copy? Support 8
N multiple command alias and redirection Support 0
B Can copy command concatenate multiple mp3 files Support 2
C INSTALLED returnes same program multiple times Support 14
D What are the rules for detecting multiple versions of TC on a machine? Support 7
C FOLDERMONITOR inactive with multiple /I Support 1
C WAD VIEW print multiple files - switches fail Support 10
vefatica Multiple instances of help file Support 3
J How to? Array sort according to multiple keys Support 3
Alexander WAD The number of files and dirs are multiplied when using multiple wildcards Support 6
Jay Sage Version 17 Installer Leaves Multiple Copies of ShrAlias Support 48
R Fixed Internal ZIP command fails to process multiple files Support 3
M How to? PDir on multiple wildcard patterns... Support 2
A WAD Dir daterange + multiple path wildcards crashes tcc Support 2
T How to? Using FOLDERMONITOR 1 event causes multiple trigger(ing)s Support 8
samintz How to? Pull out multiple matching lines Support 5
D WAD Multiple TEE causese weird variable scoping? Support 7

Similar threads