Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > MSDOS Programmer > Re: Rename DOS ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 11 Topic 471 of 495
Post > Topic >>

Re: Rename DOS File

by foxidrive <gotcha@[EMAIL PROTECTED] > Nov 1, 2007 at 09:56 PM

On Thu, 01 Nov 2007 09:53:48 GMT, ppnerkDELETETHIS@[EMAIL PROTECTED]
 (Phred) wrote:

>In article <4728CDB0.626E05E0@[EMAIL PROTECTED]
>, Herbert Kleebauer
<klee@[EMAIL PROTECTED]
> wrote:
>>brettmanning24@[EMAIL PROTECTED]
 wrote:

>>> > > Directory 1 contains:
>>> >
>>> > > DEAL1.ITF
>>> > > BRETT.TXT
>>> > > DEAL1.LOG
>>> >
>>> > > Is it possible to rename DEAL1.LOG to BRETT.LOG (the same name of
the
>>> > > TXT file).  The TXT file will be a different name each time,
therefore
>>> > > it needs to be some kind of variable rename i.e. always rename
>>> > > the .LOG file to that of the .TXT filename.
>>> >
>>> > for %%i in (*.txt) do set n=%%~ni
>>> > ren *.log %n%.log
>>
>>And this only works in W2k/XP not in DOS6/Win9x.
>
>Is that just because the wildcard doesn't work in the for ... do?

The %%~ni construct does not work in DOS6/Win9x

What OS do you need it to work on?
Are long filenames a possibility or not?
 




 11 Posts in Topic:
Rename DOS File
brettmanning24@[EMAIL PRO  2007-10-31 10:20:27 
Re: Rename DOS File
Herbert Kleebauer <kle  2007-10-31 19:09:02 
Re: Rename DOS File
brettmanning24@[EMAIL PRO  2007-10-31 11:20:59 
Re: Rename DOS File
Herbert Kleebauer <kle  2007-10-31 19:47:12 
Re: Rename DOS File
ppnerkDELETETHIS@[EMAIL P  2007-11-01 09:53:48 
Re: Rename DOS File
foxidrive <gotcha@[EMA  2007-11-01 21:56:49 
Re: Rename DOS File
ppnerkDELETETHIS@[EMAIL P  2007-11-01 13:38:30 
Re: Rename DOS File
foxidrive <gotcha@[EMA  2007-11-02 02:02:00 
Re: Rename DOS File
ak621@[EMAIL PROTECTED]   2007-11-01 14:45:25 
Re: Rename DOS File
"Jim Langston"   2007-11-05 23:08:41 
Re: Rename DOS File
foxidrive <gotcha@[EMA  2007-11-06 18:54:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 15:40:05 CDT 2008.