Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1586 connectés 

  FORUM HardWare.fr
  Programmation
  Divers

  Batch de recherche

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Batch de recherche

n°1204066
rgix
Posté le 21-09-2005 à 10:50:45  profilanswer
 

Bonjour tout le monde, je suis tout nouveau alors soyez indulgent SVP.  
Je sais pas si je poste au bon endroit mais on va bien voir.  
 
Mon problème concerne un batch : D'un côté, j'ai une liste de 1700 occurences et de l'autre, j'ai plusieurs fichiers.  
 
Grâce à un batch, j'aimerais vérifier si ,dans ces 1700, certaines sont présentes dans les fichiers concernés.  
 
Je voudrais faire les vérif dans ce batch, ex : si ... alors ... sinon.  
 
J'espère que j'ai été clair.  
 
Si ce n'est pas le cas, précisez-le  
 
Serait-il possible également de lancer une recherche Windows automatiquement avec option de recherche = "un mot ou une phrase dans le fichier".
 
Merci de votre aide  

mood
Publicité
Posté le 21-09-2005 à 10:50:45  profilanswer
 

n°1204431
dwogsi
Défaillance cérébrale...
Posté le 21-09-2005 à 15:03:10  profilanswer
 

J'ai pas très bien saisi ce que tu voulais faire avec ton batch...
Et sinon concernant la catégorie ou tu post, il y avait aussi "Shell/Batch".


---------------
-- Debian -- Le système d'exploitation universel | Le gras c'est la vie! | /(bb|[^b]{2})/
n°1204535
olivthill
Posté le 21-09-2005 à 16:14:23  profilanswer
 

Sous quel système d'Exploitation ?
 
Sous Unix, il y a les frères grep, egrep, fgrep.
 
Sous Windows 2003, il y a le père qgrep qui fait parti du "Windows Server 2003 Resource Kit Tools" qu'il est possible de télécharger gratuitement depuis http://www.microsoft.com/windowsse [...] fault.mspx
 
Avec les autres versions de Windows, il y a le bon vieux grand père FIND, dont on obtient la syntaxe par FIND /? sous DOS.
 
Voici quelques exemples d'utilisations, indiqués sur la page http://www.microsoft.com/resources [...] tcmds.mspx

Citation :

To display all lines from Pencil.ad that contain the string "Pencil Sharpener", type:  
 
find "Pencil Sharpener" pencil.ad  
 
To find a string that contains text within quotation marks, you must first enclose the entire string in quotation marks. Second, you must use two quotation marks for each quotation mark contained within the string. To find "The scientists labeled their paper "for discussion only." It is not a final report." in Report.doc, type:  
 
find "The scientists labeled their paper ""for discussion only."" It is not a final report." report.doc  
 
If you want to search for a set of files, you can use the find command with the for command. To search the current directory for files that have the extension .bat and that contain the string "PROMPT," type:  
 
for %f in (*.bat) do find "PROMPT" %f  
 
To search your hard disk to find and display the file names on drive C that contain the string "CPU," use the pipe (|) to direct the results of a dir command to find as follows:  
 
dir c:\ /s /b | find "CPU"  
 
Because find searches are case-sensitive and dir produces uppercase output, you must either type the string "CPU" in uppercase letters or use the /i command-line option with find.

:)


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Divers

  Batch de recherche

 

Sujets relatifs
FTP en batch[résolu] recherche dans l'arboresence
ameliorer la lisibilie dans un batch en dosrecherche ds un tableaux
recherche tableauImplicit super constructor Batch() is undefined. Must explicitly invok
Je recherche un tchat (avec plusieur salon) pour mon site svpFaire une recherche avec un Batch
[batch] Recherche de fichier[BATCH] faire une recherche
Plus de sujets relatifs à : Batch de recherche


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR