Useful Batch Files

From vgmrips
Jump to: navigation, search

This is a more advanced "tutorial" which is more of a cache of helpful .bat files. Comfort with use of these files is assumed.

See also "Some useful scripts for making VGM packs".

all2txt

FOR %%A IN (*.vg*) DO vgm2txt "%%A" 0 0

find_start_points

Like all2txt, but is more convenient when all you need is to find the beginning trims.

FOR %%A IN (*.vg*) DO vgm2txt "%%A" 0 0:03

opt

for %%f in (*_trimmed.vgm) do optvgm "%%f" "%%~nf.vgz" & vgm_cmp "%%~nf.vgz" & gzip.exe "%%~nf_optimized.vgm" & ren "%%~nf_optimized.vgm.gz" "%%~nf_optimized.vgz"

clean_names_and_get_stats

Usage assumptions:

  • vgm_name can be reached.
  • The folder this is used in/on only contains VGMs meant to go in the playlist.
  • (For best results) The folder is named the correct name for the pack.
echo off
vgm_name
dir *.vg* /b /on > "playlist.m3u"
vgm_stat playlist.m3u > stats.txt
for %%* in (.) do move "playlist.m3u" "%%~n*.m3u"
pause
Note: To get track stats in the proper form, using a playlist is required.
Note: Used in a .bat file, move wallops existing files rather than ignores them, much to the dismay of DeadFish and anyone else with sense. (You can't avoid this behavior with a single simple line.) At least in this case it doesn't matter.