🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.shell.batch.msdos
Article #1

Re: Making Filenames Mirror One Another With Different Extensions

#1
From: Zaidy036
Date: Mon, 10 Jan 2022 22:42
28 lines
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
Technical Details
Message-ID: <sricoh$gnp$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <MPG.3105cfae4be44d7598c10a@news.eternal-september.org>

Show Full Headers
Complete Article Headers
Message-ID: <sricoh$gnp$1@dont-email.me>
Subject: Re: Making Filenames Mirror One Another With Different Extensions
Date: Mon, 10 Jan 2022 17:42:26 -0500
From: Zaidy036 <Zaidy036@air.isp.spam>
References: <MPG.3105cfae4be44d7598c10a@news.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: alt.comp.editors.batch,alt.comp.lang.shell.batch.enhancements,alt.comp.lang.shell.batch.msdos,alt.comp.lang.shell.batch.winnt,alt.msdos.batch,alt.msdos.batch.nt
Organization: A noiseless patient Spider
Lines: 29
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 10 Jan 2022 22:42:26 -0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2
Cancel-Lock: sha1:Z5MIRqtTmFDqKKF8e+4TboAQ3+g=
In-Reply-To: <MPG.3105cfae4be44d7598c10a@news.eternal-september.org>
Content-Language: en-US