I wanted to create a file in bath
where the user would choose the location where to execute the command DIR
.
I have this done:
@echo off
set /p pasta=digite uma pasta: dir %pasta%>>c:\conteudo2.txt
if exist %pasta% goto existe
if not exist %pasta% goto nao
:existe
echo file found
goto fim
:nao
echo file not found
:fim pause
My problem is this:
"Create from the command line a file named Listar2.bat, which allows the contents of a user-supplied directory to be stored inside a file named Content2.txt on the desktop."