|
Answer» How WOULD you change the entire contents of a folder into the same file type using command prompt?
By the way, everything in the folder is simply a file, it DOESN'T have a file extension.Do you mean like changing .exe's to a folder in a specific place?What I mean is that changing everything (let's call one of them A) in one folder to ANOTHER file type (i.e. from .gif to .bmp).
I can change individual files by doing:
Code: [Select]C:\FOLDER\A.gif > C:\FOLDER\A.bmp And I try this: Code: [Select]C:\FOLDER\*.* > C:\FOLDER\*.bmp
You seem to be confused about the difference between a file type and a file extension.
A GIF image type file usually has the extension gif, and a Windows Bitmap type file usually has the extension bmp, but if you change the extension of a GIF file to bmp, it does not magically become a bitmap file. It is still a GIF file, but now with the wrong extension. Load it into an image editor, and the editor may well give an error message.
You could change a file's extension from GIF to mp3, but that does not mean you'll hear a PRETTY tune when you try to play it.
If you want to convert a GIF file to a BMP file, you have to convert it with image processing software.
Only a few file types can be changed by changing the extension. You can change a txt file to a doc file and it would still be READABLE.
You can change (for example) all the txt files in a folder to doc files by renaming them with the ren command thus:-
ren *.txt *.doc
You can rename all of the files in a folder to doc files by renaming them thus
ren *.* *.doc
But some may not be readable in Microsoft Word!
Whoops! Question was already answered, sorry.
Do you want everything to have the same extension? If so this should work, if not more info is needed.
Code: [Select]for /F "delims=" %%a in ('dir /b c:\blah') do ren "c:\blah\%%a" "%%a.ext"
You'll have to edit the paths of course.Thanks contrex, it worked. And thanks for your help as well, profit, but I like it simple.
|