I'm looking for a batch (.bat) file to be written for me that handles some file management tasks. When run, I need it to:
- Check a specified folder for wave (.wav) files and compare each one it finds to the entries in a text file I use called catalog.txt. A sample of these entries can be seen in the following screenshot.
- If the index (the symbol before the comma) of any entry matches the name of the file (excluding the extension, .wav) the file should be deleted. Otherwise, conduct the following steps.
- Create a new folder with a name that matches the name of the wave file (excluding .wav). The location to create this folder will be specified for you.
- Move the file to this newly created folder.
- Add an entry to catalog.txt in the format
[name], 0 1. 0. [filepath] 0.;
where [name] is the name of the wave file without extension and [filepath] is the entire absolute path of the file (in its newly created folder) including extension, using forward slashes not backslashes. Both [name] and [filepath] should be surrounded in double-quotes if they contain spaces.