Link to home
Start Free TrialLog in
Avatar of Mateen
Mateen

asked on

Rename Files Instantaneously

I have a folder in which so many files
and there are all files name starting with "COMPACT -"
its mean all files names are like this..
COMPACT - *************
COMPACT - XXXXXXXXXXXX
COMPACT - YYYYYYYYYYYY
COMPACT - ZZZZZZZZZZZZ

I want to remove COMPACT - FROM THE ALL FILES
I dont want to use any third party software
I want to ask any command or batch file method?

Thanks
Rashid
Avatar of blue_zee
blue_zee
Flag of Portugal image

Free tools:

Renamer v6.0
http://www.albert.nu/programs/renamer/main.htm

1-4a-rename
http://www.1-4a.com/rename/

Irene - Rename Wizard
http://www.gomiller.com/downloads/irene.html

Hope one of these fits your plan.

Cheers,

Zee
Avatar of Mateen
Mateen

ASKER

Thanks for your reply but,
I dont want to use any tools , I want to use any rename command or replace command.
if this were text in Ms Word we can easily replace it with replace (F5) command.
just like this
Find What     =  COMPACT -
Replace with =  ''

Thanks
Rashid
Try these links
http://www.computing.net/dos/wwwboard/forum/14607.html
and
http://www.computing.net/dos/wwwboard/forum/14574.html (need to scroll down some ways to the good stuff)

Why don't you want to use tools?
ASKER CERTIFIED SOLUTION
Avatar of callrs
callrs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the grade.
But the code above doesn't work on Win98. It uses advanced syntax that will work on Win2K and XP (and on NT? I don't know)
What you want done may be impossible, or would require a lot more MSDOS knowledge than most people have, to do in Win98 using just pure MSDOS -- You'd need to use another language like Windows Scripting Host (WSH) or make a compiled program using C, C++, VB, etc. which are actually so much easier to code in than in MSDOS.
I could try to do the WSH solution, since WSH is part of Win98 and can be run almost like an MSDOS script. I'll have to bit of learning to do to do it, but I love learning.

I'll post elsewhere later other MSDOS renaming code & info.

Did you need a solution for Win2k or XP? If you need a solution for Win98 as well, let me know...


It is impossible in "oldish" MS-DOS.

Zee

But it fails my understanding why poster does not want to use one of the many FREE available tools...

Zee
One reason for a non-third-party solution:

"Adam314, it works great. Thanks a ton! Full points to you.

"MahmoudAbdElSattar, we did try some software already and didn't have any luck. I bet the software you mentioned is more robust, but we want to be able to do this in the future from many machine without having to install any software, hense the request for a batch. Thank you for the suggestion though."
From https://www.experts-exchange.com/questions/21506296/Batch-renaming.html     Programming: Batch renaming

In which the post also mentions "Lupas Rename 2000" http://www.azheavymetal.com/~lupasrename/lupasrename.php

IMO, forgive me, not a good enough reason, and even less important inthis specific question, but then it's only me thinking and typing...
;-)
Avatar of Mateen

ASKER

This is very easy to search , install and rename with any third-party solution, so
if i need any tools for renaming i dont post this question here.
Thanks callrs you gave me very constructive information


https://www.experts-exchange.com/questions/21873735/RENAME-FILES-USING-PURE-MS-DOS.html     "RENAME FILES USING PURE MS-DOS"
Version 1.01 posted there vs. v1.0 here:
1) echoing the '&' sign:        echo ...&...   must instead be:  echo ...^&...
2) Better user-input method: set /p input=Enter y to execute the above commands, anything else to quit: