REACT:Using Short Filenames
It is possible, depending on your file naming scheme, that you may produce file paths that are too long for the command line (255 characters, or 260 for full paths).
If you encounter this problem you can adapt your config file using a workaround to create DOS 8.3 format file paths from their Windows equivalents.
The test code (you can save this as a batch file and run it to see what happens) is as follows:
REM Populate our variable shortValue with the short version of our path CALL :GetShortPath "C:\This is a long path\to a file.mp3" shortValue REM Display the short value ECHO %shortValue% REM Pause PAUSE GOTO:EOF REM Convert a long file path to a short file path :GetShortPath SET %2=%~fs1 GOTO:EOF
This creates a "function" that will convert a long file path to a short file path. The first line passes the long path, and the name of the variable that should be set to the short path value ("shortValue") to the function. The value of "shortValue" is then ECHO'd to the screen.
Below is an example using real config code:
REM Remove original code REM MOVE /Y "@image@" %dest% REM MOVE /Y "@cuesheet@" %dest% REM Create short name variables CALL :GetShortPath %dest% destShortPath CALL :GetShortPath "@image@" imageShortPath CALL :GetShortPath "@cuesheet@" cuesheetShortPath REM Move using short names MOVE /Y %imageShortPath% %destShortPath% MOVE /Y %cuesheetShortPath% %destShortPath%
This requires the following code to be appended to the end of your config file.
:GetShortPath SET %2=%~fs1 GOTO:EOF