Log in

View Full Version : ProjectX and spaces in filenames.


chaumurky
7th October 2004, 06:51
Hi all. I have a batch file to which I associate my TP/TS captures for simple 1 pass transcoding by simply clicking on the file:

"C:\Program Files\ProjectX\ProjectX.jar" -o v:\Temp -n demux "%1"
"C:\Program Files\GordianKnot\VirtualDubMod\VirtualDubMod.exe" /s"C:\Program Files\GordianKnot\VirtualDubMod\settings.vcf" /p"V:\Temp\demux.mpv","W:\Capture\%~n1.avi" /r /x
del "V:\Temp\demux.*
del %1 /P

The problem is ProjectX, running in Java, doesn't accept filenames with spaces. My DTV software names captures with spaces so I'm forced to get out the keyboard and remove them before proceeding. Is anyone aware of a way to get around this while maintaining the 'one click' nature of what I'm trying to do. Any help would be greatly appreciated.

George.

buzzqw
7th October 2004, 07:19
something like this ?

ECHO Please choose a file:
ECHO.
DIR /B *.ts *.ps
ECHO.
SET /P FILE= Insert a significative string:
FOR /F "tokens=*" %%i in ('DIR /B *.ts *.ps ^|FIND /I "%FILE%" ^') DO SET CFILE=%%i
ECHO.
ECHO Found file: %CFILE%
ECHO.
C:\Program Files\ProjectX\ProjectX.jar -o v:\Temp -n demux "%CFILE%"
"C:\Program Files\GordianKnot\VirtualDubMod\VirtualDubMod.exe" /s"C:\Program Files\GordianKnot\VirtualDubMod\settings.vcf" /p"V:\Temp\demux.mpv","W:\Capture\%~n1.avi" /r /x
del "V:\Temp\demux.*
del %CFILE% /P


save in a batch file

BHH

chaumurky
7th October 2004, 08:08
I'll have to have a closer look, but from what I can see, it requires further user input. I wish to keep the process completely automated.

I should explain a little further my use for this: I am seeking to integrate the function of this batch file into a module of Meedio (HTPC frontend). The module lists my captures in a folder and apon selecting an item, the batch file is envoked with the filename passed to it.

This already works, however, if there is a space in the filename, ProjectX won't continue. This is strange because, in GUI mode, the file can be opened. I just need to know how to achieve this in the CLI. Thanks for your help though I really appreciate it.

George.

chaumurky
7th October 2004, 10:58
Sorted:

W:
cd ..\Capture
ren "%1" temp.file
"C:\Program Files\ProjectX\ProjectX.jar" -o v:\Temp -n demux temp.file
"C:\Program Files\GordianKnot\VirtualDubMod\VirtualDubMod.exe" /s"C:\Program Files\GordianKnot\VirtualDubMod\settings.vcf" /p"V:\Temp\demux.mpv","W:\Capture\%~n1.avi" /r /x
del "V:\Temp\demux.*
del temp.file

:)

chaumurky
9th October 2004, 06:48
whoops, small mistake. Line 3 should be:
ren %1 temp.file