Batch file to delete or copy files

Unanswered Batch file to delete or copy files

  • jeudi 16 juillet 2009 10:18
     
     
    Hi all,

    I have a directory with jpeg files. Then I have a list of numbers, for instance:

    10023
    10024
    10027
    10028
    10031

    The jpeg's are also named like this: 10023.jpg, 10024.jpg, ...

    I want to write a batch file that

    • Option 1: deletes all jpeg files that are not in the list of numbers
    • Option 2: copies all jpeg files that are in the list to another directory
    I don't mind to use the list of numbers hard coded in the batch file.
    Problem is that I have no idea how to do this.

    Can someone write me something quick?

    Cheers.
    Jimmy

Toutes les réponses

  • samedi 12 mars 2011 17:34
     
     
    well i wouldnt know how to do ll of that, but i do know that the commands del(deletes files) ren(renames files) copy(copies files) move(moves files) i find the website http://ss64.com/nt/ helpful