You linked to the answer but just to be clear try this
in the editor cautiously find and replace \input{ with \inputf{
As queried this will affect the editors ability to jump to from subfiles the safest way to handle that would be to simply prepend all subfiles with the line \currfilename and I give two more risky alternative solutions below.

\documentclass[10pt]{article}
%\usepackage{currfile} % not required
\usepackage{lipsum} % for demonstration each file contains \lipsum[1]
\newcommand\inputf[1]{\texttt{#1} \par\nobreak\input{#1}} % filename before
%\newcommand\inputf[1]{\input{#1}} % Per David's comment, uncomment this line and comment the line above to "resume normal service"
\begin{document}
\inputf{File1.tex}
\inputf{File2.tex}
\inputf{File3.tex}
\inputf{File4.tex}
\end{document}
We could stick with the original request to add \currfile to all \inputs (thus retaining the natural workflow. so the main.tex stays the same with one added line)
\documentclass[10pt]{article}
\usepackage{currfile} %required for modified inputs
\usepackage{lipsum} %for demo only
\begin{document}
\input{file1.tex} % note it is this name that the file has (lowercase file)
\input{File2.tex} % note in the screenshot this is the name that \input \currfilename uses, however the real file name is lowercase file..
\input{File3.tex}
\input{File4.tex}
\end{document}

each of the tex files is prepended with a header stored in a file say currfile.txt containing
\texttt \currfilename \par
On windows this can be easily processed to the start of each txt file by using a AddCurrfile.cmd file in the same directory. (you run this at your own risk I have included a safety backup on first line but always test on a copy folder.)
for %%f in (file???.tex) do ren %%f %%~nf.bak
for %%f in (file???.bak) do copy currfile.txt/B+%%f/B %%~nf.tex/B
To revert the tex files to previous behaviour you could script the removal/rename HOWEVER I did say keep a backup folder without the changes did I not ?
Finally probably the solution you were looking for but its somewhat risky since it modifies a major command thus may impact other \inputs and I thus cannot control how you apply it.
Add this to your preamble and remove/comment out when not required.
% changing the syntax of a major command is not a good approach, so better to consider sticking with one of the two above solutions:
\makeatletter
\let\latex@input\input
\newcommand\current@input[1]{\texttt{#1} \par\nobreak\latex@input{#1}%
}
\AtBeginDocument{\let\input\current@input}
\makeatother
\begin{document}
\currfilenamein the file isn't the required output justFile1.tex \input{File1.tex} File2.tex \input{File2.tex}? – David Carlisle Apr 24 '19 at 22:39foobar \input{foobar}then the final pdf will have the filename in the output – David Carlisle Apr 24 '19 at 23:04\inputto\myinputthen\newcommand\myinput[1]{#1\input{#1}}when you want the name printed or\newcommand\myinput[1]{\input{#1}}when you do not – David Carlisle Apr 24 '19 at 23:23