a batch file to search for anything within windows for final extams
Moderator: DosItHelp
a batch file to search for anything within windows for final extams
hello folks
i really need help with a batch file code to search for anything within windows like search in windows?
any ideas
please please please please please i really need this
something like the traditional windows 8/10 search box.
to be able to search for all pdf files and files with my name on .
i study in dutch so its not easy for me but if i can get the code i may able to translate them . thank you all
i really need help with a batch file code to search for anything within windows like search in windows?
any ideas
please please please please please i really need this
something like the traditional windows 8/10 search box.
to be able to search for all pdf files and files with my name on .
i study in dutch so its not easy for me but if i can get the code i may able to translate them . thank you all
Last edited by rahhem on 04 Jan 2016 09:44, edited 1 time in total.
Re: a batch file to search for anything within windows for final extams
What are you trying to search for?
A file?
Text within a text file?
A file?
Text within a text file?
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: a batch file to search for anything within windows for final extams
What, like the find command or the dir command?
Re: a batch file to search for anything within windows for final extams
some text files and other file on my harddrive, just like traditional windows search
Re: a batch file to search for anything within windows for final extams
DIR /S *.txt "Another file.doc"
Re: a batch file to search for anything within windows for final extams
Now the question where and how do I place to text commands?
Or anywhere ?
Or anywhere ?
Re: a batch file to search for anything within windows for final extams
so far this how i get , guys don't mind the stupid foreign language
any subjections where i should place the directory code?
Code: Select all
echo off
title zoekopalles
color 9f
=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
:one
cls
echo Halo %username% mijn naam is Zoekopalles!
echo Welkome
echo Gelieve uw voornaam in te vullen:
echo.
echo.
set /p fnaam=
echo.
echo.
echo Hallo leuk om jou te ontmoeten %fnaam%!
pause>nul
:start
Title Het Menu
cls
echo %TIME% %DATE%D%M%J%
echo.
echo 1- PDF Bestanden
echo 2- Word Bestanden
echo 3- Refreshen
set Choice=
set /p Choice=""
pause>nul
if '%Choice%'=='1' goto PDF Bestanden
if '%Choice%'=='2' goto Word Bestanden
if '%Choice%'=='3' goto Refreshen
cls
echo '%Choice%' is niet geldig
ping localhost -n 2 >Nul
echo Probeer Opniuew
ping localhost -n 2 >nul
cls
goto start
any subjections where i should place the directory code?
Re: a batch file to search for anything within windows for final extams
I think there is a couple of people that frequent this forum that speak your language. Hard to tell where you want to put it. I have no idea what you are trying to accomplish. You have GOTO statements in your code with NO labels to GOTO. Hard to give you any advice.
Re: a batch file to search for anything within windows for final extams
please they code did not work , each time i run the batch file , it just gives the name of the c drive and volume and the serial number?
can any one help. just a directories name to search for pdf and word file please help me folk this is my last the make something good in for me please
can any one help. just a directories name to search for pdf and word file please help me folk this is my last the make something good in for me please
Re: a batch file to search for anything within windows for final extams
I'm not sure, maybe this is a first step (if i don't misinterpret what you want to do):
penpen
Code: Select all
@echo off
title zoekopalles
color 9f
:one
cls
echo Hello %username% my name is Zoekopalles ^(?FindAll?^)!
echo Welcome
echo Please enter your first name:
echo.
echo.
set /p "firstName="
echo.
echo.
echo Hi nice to meet you %firstName%!
pause
:start
Title The menu
cls
echo %TIME% %DATE%
echo.
echo 1- PDF files
echo 2- Word files
echo 3- Refresh
set "choice="
set /p "choice="
if "%choice%" == "1" goto :pdfFiles
if "%choice%" == "2" goto :wordFiles
if "%choice%" == "3" goto :refresh
cls
echo "%choice%" is not valid
>nul ping localhost -n 2
echo Try again.
>nul ping localhost -n 2
cls
goto :start
:pdfFiles
rem search C:\ and all subdirectories for Word files
pushd "C:\"
echo DIR "C:\" /S "*.pdf"
popd
pause
goto :eof
:wordFiles
rem search C:\ and all subdirectories for Word files
pushd "C:\"
echo DIR "C:\" /S "*.doc" "*.docm" "*.docx" "*.replaceWithOtherWordFileExtensions"
popd
pause
goto :eof
:refresh
echo don't know what to do here
pause
goto :eof
penpen