can i unblock several files with total commander ?
in windows , there is command line for example
Code: Select all
"unblock-file -path "C:\Users\Brink\Desktop\Example.reg"
thanks
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
"unblock-file -path "C:\Users\Brink\Desktop\Example.reg"
There is no unblock-file command in Windows !giulia wrote:Hi
can i unblock several files with total commander ?
in windows , there is command line for exampleCode: Select all
"unblock-file -path "C:\Users\Brink\Desktop\Example.reg"
thanks
hiHorst.Epp wrote:There is no unblock-file command in Windows !giulia wrote:Hi
can i unblock several files with total commander ?
in windows , there is command line for exampleCode: Select all
"unblock-file -path "C:\Users\Brink\Desktop\Example.reg"
thanks
What should such a command do ?
hi DalaiDalai wrote:This stuff is stored in NTFS ADS (Alternate Data Streams), so you may use any tool that removes those from files, e.g. Sysinternals Streams or some PowerShell commands (the Wikipedia article mentions that PS 3.0 can natively manage ADS).
Regards
Dalai
Yes, of course. If you want to create a button on the button bar, just press F1 in the according dialog (while editing the button bar) and the help will open with the appropriate page. The help page lists the possible parameters like %S, %P, %N, %L and so on. It depends on the tool you use which parameter is the right one for your task.giulia wrote:but seeing there is a command line, i would like to know if total commander can pass files and folders to the unblock-file or get-childitem
Code: Select all
TOTALCMD#BAR#DATA
powershell.exe
-noexit -command "& {Get-Content -path '%WL' | Foreach-Object {Unblock-File -LiteralPath $_}}"
powershell.exe
-1
hi thanksZoSTeR wrote:Copy and paste this as a button. All selected files will be unblocked.Remove the "noexit" after testing.Code: Select all
...
Code: Select all
powershell.exe
Code: Select all
-noexit -command "& {Get-Content -Path '%WL' | Foreach-Object {Unblock-File -LiteralPath $_}}"
Code: Select all
param($a);
write-host "argument is: $a";
Code: Select all
powershell -NoProfile -ExecutionPolicy Bypass -File "F:\1.ps1" "first argument where $vars are not expanded" "second argument etc"
Code: Select all
-NoProfile -ExecutionPolicy Bypass -Command "&{&'F:\File.ps1' 'first argument where $vars are not expanded' 'second argument etc'}"
hiZoSTeR wrote:MVV, you're right. The argument %WL should be in single quotes. Edited above.
To avoid quoting hassle when calling a script see this thread. I had to do some research until I found that solution somewhere.
For your example:
Parameter:Always use -LiteralPath where available. Get-ChildItem is tricky/buggy with square brackets.Code: Select all
-NoProfile -ExecutionPolicy Bypass -Command "&{&'F:\File.ps1' 'first argument where $vars are not expanded' 'second argument etc'}"
Code: Select all
takeown /F C:\Windows.old\* /R /A
icacls C:\Windows.old\*.* /T /grant administrators:F
rmdir /S /Q C:\Windows.old\