Thread View: alt.comp.lang.shell.batch.winnt
1 messages
1 total messages
Started by Zaidy036
Mon, 10 Jan 2022 22:42
Re: Making Filenames Mirror One Another With Different Extensions
Author: Zaidy036
Date: Mon, 10 Jan 2022 22:42
Date: Mon, 10 Jan 2022 22:42
28 lines
2093 bytes
2093 bytes
On 1/17/2016 5:20 PM, AlleyCat wrote:
>
> Hello all. I think this will be simple for you batch and script gurus, but
> it's driving me crazy.
>
> Videofile: House.S08E18.Body And Soul.mkv
>
> Subtitle: House.S08E18.HDTV.XviD-LOL.srt
>
> If you please... copy text after third period (or whatever will be before
> the extension in other cases) of videofile and copy it to the srt file, so
> both files are identical other than the extension.
>
> Sample: House.S08E18.Body And Soul.mkv
> House.S08E18.Body And Soul.srt
>
> Not all vid files are in this "format", but I'll work on it from there.
>
> Thank you so very much.
>
Substitution works for you:
SET Title="House.S08E18.Body And Soul.mkv"
SET Title2="%Title:~0,-3%srt
then
Echo Title2
gives
House.S08E18.Body And Soul.srt
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads