Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How do I do to remove extensions of files in WindowsXP? Observation: I tried to use the command:
ren *.* *
and
ren *.* *.
however this commands not more they work in WindowsXPRespectfully,
SektorJedi

In the Command Prompt box typing:
HELP and pressing enter will list valid commands available to XP, if you then add the /? switch to any command it will show the parameters for use ie
REN /? press enter
RENAME /? press enterThis will list the various options for renaming a file...........
Viola

What appears in WinXP it is same to it that appears in Win9x. And I don't just want rename a file, but to remove the extension of several files.

You can remove the extensions of the files but you will the associations related to opening those files.

I know, I just want to remove the extensions of several files. Will it be that that is impossible in the DOS of windowsXP?

Do you mean remove the extensions of files?
i.e. remove BAT from AUTOEXEC.BAT
Which does not make sense. That can be done with a simple REN command.or remove associations within XP i.e.
Open WinImage for all file with
.IMA or IMZ extensions?

SektorJedi's request is not so hard to understand... He simply wants to take out the extentions of all files on a same directory, and he wants to do it all automatically, if possible with a single command, since there are several files.
The reasons why he want to do such thing I don't care, though warning that such thing might have undesired consequences would be good. But you've already done that.
SektorJedi, the mentioned command indeed won't work on WinXP. Instead, use the following command to take out the extentions of all files from the current directory. Such operation has not an undo function, so be careful and use at your own risk.
for %F in (*.*) do ren "%F" "%~nF"
That's all! Such command is to be used directly on the command prompt. If you intend to put it on a batch file, use this syntax instead:
for %%F in (*.*) do ren "%%F" "%%~nF"
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

I discovered a way that is compatible with Windows9x and WindowsXP.
Observation: When I said that the command ren *.* *. it didn't work, I made a mistake, the one that doesn't work is the command ren *.* *
I made the following
I created a file test.bat:
cd mydir
ren *.* *.
cd ..
However I noticed that this command works in a different way in Windows9x and in WindowsXP. Example:
In Windows9x do:
sound1.wav.mp3 --> sound1.wav
In WindowsXP do:
sound1.wav.mp3 --> sound1 (Without extension. In this case it is only to add the command " ren *.* *.wav, he will repair like this in WindowsXP and he won't have effect in Windows9x, and it will be like this compatible with both)
Thank you for the attention,
SektorJedi

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |