Comment supprimer fichiers from a dossier using a list of fichier names in windows?
Comment supprimer fichiers from a dossier using a list of fichier names in windows?
i have a folder with 2K+ files in it, i need to delete around 200, i have a txt file with all the nom de fichiers i need removed ordered in a list, how do i remove the specific files from the folder using the list? (OS is windows 7)
Re: Comment supprimer fichiers from a dossier using a list of fichier names in windows?
Type this on the ligne de commande, substituting your file for `files_to_delete.txt`:
```
for /f %i in (files_to_delete.txt) do del %i
```
A version of this suitable to include in `.cmd` files (double %%) and able to deal with spaces in nom de fichiers:
```
for /f "delims=" %%f in (files_to_delete.txt) do del "%%f"
```
```
for /f %i in (files_to_delete.txt) do del %i
```
A version of this suitable to include in `.cmd` files (double %%) and able to deal with spaces in nom de fichiers:
```
for /f "delims=" %%f in (files_to_delete.txt) do del "%%f"
```