Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,661 of 42,547    |
|    Grant Taylor to rafflenbeul    |
|    Re: Problems with renaiming    |
|    19 Aug 18 12:58:51    |
      From: gtaylor@tnetconsulting.net              On 08/19/2018 06:25 AM, rafflenbeul wrote:       > Hy to all..              Hi,              > I ve got the following Problem..       >       > Some of my mp3 Files are written like       >       > gdgfdgfg.MP3       >       > I would like to renae it to       >       > gdgfdgfg.mp3       >       > with normal ren .MP3 to mp3 it would not work.       >       > so i`ll try ren .MP3 to p3 and ren p3 to mp3 ... that will work...              Sure.              I suspect you could move do the following too:               move gdgfdgfg.MP3 temp\gdgfdgfg.mp3        move temp\gdgfdgfg.mp3 gdgfdgfg.mp3              I'm guessing that gdgfdgfg.MP3 and gdgfdgfg.mp3 are effectively the same       file.              > as parameters for my Batch i get :              How is your batch file being called?              > "path-of-file-with\"empty"filename-without-ext".MP3              I'm not sure I'm tracking what you are saying there?              Is "empty" a representation for white space in the file name? Or is it       a parameter separation?              > i would likt to get the following and hope you can help me :       >       > ren path-of-file-with\filename-without-ext.MP3              Do you want the (path+)filename-without-extension to be the argument to       the batch? Or do you want the batch to receive       (path+)filename-with-extension and do the proper conversions for you?       (I would think the latter.)              > without the quotation marks around the parameters and without the spaces       > between the both parameters and the ending.              The quotation marks around the parameters makes sense and (I think) is       an artifact of being able to handle parameters with white spaces in them.              I'm not sure what you mean by "both parameters" or "and the ending".              > Is there any batchoption with ltrim or right$ or anything else ??              Which batch environment are you running in?              Seeing as how you're talking about spaces and quoting parameters, I'm       guessing it's not classic MS-DOS (et al).              It's been a REALLY LONG TIME since I've used this, but I seem to recall       that for had options to specify files names with(out) path and / or       extensions. So you'd do something like this:               for %f in (path\gdgfdgfg.MP3) do        rem something              Where the parameters to for tell it that you want it to strip the       extension and / or the path. You might have to do each in separate steps.              I think that you'd rather have the wrong extension passed to the batch       file, instead of assuming that it's ".MP3", so that it could work with       other extensions too.              For might even have an option to simply change the case of what's passed       to it. Thus enabling you to make your batch even more extension agnostic.                            --       Grant. . . .       unix || die              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca