-1
I wanted to create a file in bath
where the user chose the place where to perform the command DIR
.
I’ve got it 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
This is my problem:
" Create from the command line a file with the name List2.bat, which allows you to store inside a file with the name Content2.txt, on the desktop, the contents of a directory provided by the user. "
Explain better how you want this choice to be made, and show what you’ve already got ready. Otherwise the question becomes too wide for the format of this site (take a look at [tour]).
– bfavaretto
Why delete the question, @Laérciolopes?
– bfavaretto