I have script for change file type extensions and changed all filetypes but TXT without only.

@echo off

rem --> Check for permissions
>nul 1>nul 2>nul "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

rem --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
ping.exe 127.0.0.1 -n 2 >nul 1>nul 2>nul
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"="
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B

:gotAdmin
pushd "%CD%"
CD /D "%~dp0"

rem --> Start

setlocal EnableDelayedExpansion

set ext=^
    ini^
    lua^
    txt^
    dat^
    data^
    xml^
    srt^
    log^
    lua^
    rsc^
    php

set /a counter=1
for %%a in (%ext%) do (
    set "ext[!counter!]=%%~a"

    echo Associating .%%a
    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%a" /f>nul 1>nul 2>nul
    reg delete "HKEY_CLASSES_ROOT\.%%a" /f>nul 1>nul 2>nul
    ftype Notepad++="C:\Program Files\Notepad++\notepad++.exe" "%%1">nul 1>nul 2>nul
    assoc .%%a=Notepad++>nul 1>nul 2>nul

    set /a counter=counter+1
)

exit
New contributor
truefriend-cz is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as unclear what you're asking by harrymc, DavidPostill Dec 6 at 21:04

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What's the question? – davidbaumann Dec 6 at 15:00
  • How i can delete this question? This server is abnormaly. – truefriend-cz Dec 9 at 18:54