[MSDOS] récup. nom fichier à partir arboresce
Fermé
nabil390
-
27 juin 2008 à 10:57
cchristian Messages postés 921 Date d'inscription lundi 21 janvier 2008 Statut Membre Dernière intervention 6 mars 2012 - 27 juin 2008 à 14:14
cchristian Messages postés 921 Date d'inscription lundi 21 janvier 2008 Statut Membre Dernière intervention 6 mars 2012 - 27 juin 2008 à 14:14
A voir également:
- [MSDOS] récup. nom fichier à partir arboresce
- Annuaire portable gratuit a partir d'un nom ✓ - Forum Mobile
- Comment trouver un numéro à partir du nom et prénom ✓ - Forum Mobile
- Fichier rar - Guide
- Nom de l'adresse ✓ - Forum Internet / Réseaux sociaux
- Trouver un numero de portable a partir d'un nom svp - Forum Internet / Réseaux sociaux
2 réponses
cchristian
Messages postés
921
Date d'inscription
lundi 21 janvier 2008
Statut
Membre
Dernière intervention
6 mars 2012
130
27 juin 2008 à 13:13
27 juin 2008 à 13:13
Bonjour,
De mémoire, je n'ai momentanément pas d'environnement pour tester, ça doit donner quelque chose comme ça :
On doit récupérer tous les noms de fichiers (et leur extension) d'une même arborescence
De mémoire, je n'ai momentanément pas d'environnement pour tester, ça doit donner quelque chose comme ça :
SET "param_1=%1"
rem si %1 = c:\temp\
SET "param2=*"
............................
.............................
FOR /R "%param_1%" %%F IN (*.%param_2%) DO (
SET "nom_ext=%%~nxF"
ECHO !nom_ext! )
On doit récupérer tous les noms de fichiers (et leur extension) d'une même arborescence
cchristian
Messages postés
921
Date d'inscription
lundi 21 janvier 2008
Statut
Membre
Dernière intervention
6 mars 2012
130
27 juin 2008 à 14:14
27 juin 2008 à 14:14
Merci pour le retour et les informations qui l'accompagnent, à +, bon courage,
27 juin 2008 à 13:48
C'est exactement ça merci bcp cchristian !
for %%A in (C:\*) do (
echo %%~nxA
)
voici ce que j'ai trouvé aussi
%~I expands %I removing any surrounding quotes (")
%~fI expands %I to a fully qualified path name
%~dI expands %I to a drive letter only
%~pI expands %I to a path only
%~nI expands %I to a file name only
%~xI expands %I to a file extension only
%~sI expanded path contains short names only
%~aI expands %I to file attributes of file
%~tI expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I searches the directories listed in the PATH environment variable and expands %I to the fully qualified name of the first one found. If the environment variable name is not defined or the file is not found by the search, then this modifier expands to the empty string