| 1. |
Solve : Batch file for deleting files based on absence files with same name? |
|
Answer» Hi there, example: I can't see how romA.zip and romB.zip are related to each other. Or how 5 directories are involved. Okay let me explain this. example: Map System contains - Map R (contains Roms) - Map A (contains artwork) - Map B (contains artwork) - Map C (contains artwork) - Map D (contains artwork) For every rom file there is artwork with EXACT the same name (diffrent ext) which are placed in the diffrent artwork maps (A, B, C &D). First this, the directory structure is PART of a program called Hyperspin which is a Arcade Frontend for old games so it's not a choice for me. I have to DEAL with it ;-) lets say: PACMAN So normally there is 1 pacman file in all 5 directories with the same name, pacman.rom (MapR), pacman.png (MapA), pacman.png (MapB), pacman.png (MapC) and pacman.mp4 (MapD). The MapR for roms is leading. When pacman.rom is deleted from MapG there are still 4 pacman files left on this disk. I want to scan these other maps for "Orphan" files. When the script is done MapA, MapB, MapC & MapD no longer have pacman files inside them. You can do this by hand off course but we are talking here about almost 20.000 rom files ;-) (5 maps x 20000 rom, so 100000 files in total) So by hand deleting the files will take ages. My solution is to delete ALL rom files from MapG and copy back the rom files i need frommy backup instead of deleting them one by one.Thats why i need such a solution/script.Quote from: rikos on December 07, 2015, 07:28:43 AM Okay let me explain this.You gave the examples above and then referred to Map G which didn't exist. Quote The MapR for roms is leading. When pacman.rom is deleted from MapG there are still 4 pacman files left on this disk. I want to scan these other maps for "Orphan" files. When the script is done MapA, MapB, MapC & MapD no longer have pacman files inside them. It seems as though you want to delete one file, and then remove all other files with the same name.any_extension from every folder - except from Map R. Are you manually deleting this file? On re-reading your initial post - you are dealing with ZIP files. It also seems that the "rom map" you are referring to is a text file with a list of names in it. Hi, sorry for the late responce.. Found a solution with a tool which COMPARES multiple locations and deletes the unneeded files. Thnx for responding! |
|