File extension changer

S

SANTANDER

Could anyone recommend handy File Extension Changer utility, to change files
extension? Renaming manually via enable 'Hide file extensions for known
file types' option in 'Folder Options' menu is not very convenient since if
then whenever we want to rename a certain file, we will always have to
include the extension for it, or else we will get a warning prompt.

Thanks
 
P

PCR

SANTANDER wrote:
| Could anyone recommend handy File Extension Changer utility, to
| change files extension? Renaming manually via enable 'Hide file
| extensions for known file types' option in 'Folder Options' menu is
| not very convenient since if then whenever we want to rename a
| certain file, we will always have to include the extension for it, or
| else we will get a warning prompt.

What extensions do you want to change? The warning prompt is important
because changing extensions can cause a program no longer to function as
expected when clicked.

However, to avoid the warning, you can do it in a Windows DOS box...

(1) "START button, Programs, MS-DOS Prompt"
(2) REN C:\Folder\Filename.txt Filename.newext

C:\>REN /?
Renames a file/directory or files/directories.

RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
filename2]
REN [drive:][path][directoryname1 | filename1] [directoryname2 |
filename2]

Note that you cannot specify a new drive or path for your destination.


| Thanks

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
S

SANTANDER

"PCR" <pcrrcp@netzero.net> wrote in message
news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
> SANTANDER wrote:
> | Could anyone recommend handy File Extension Changer utility, to
> | change files extension? Renaming manually via enable 'Hide file
> | extensions for known file types' option in 'Folder Options' menu is
> | not very convenient since if then whenever we want to rename a
> | certain file, we will always have to include the extension for it, or
> | else we will get a warning prompt.
>
> What extensions do you want to change? The warning prompt is important
> because changing extensions can cause a program no longer to function as
> expected when clicked.
>
> However, to avoid the warning, you can do it in a Windows DOS box...
>
> (1) "START button, Programs, MS-DOS Prompt"
> (2) REN C:\Folder\Filename.txt Filename.newext
>
> C:\>REN /?
> Renames a file/directory or files/directories.
>
> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
> filename2]
> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
> filename2]
>
> Note that you cannot specify a new drive or path for your destination.
>
>
> | Thanks
>
> --
> Thanks or Good Luck,
> There may be humor in this post, and,
> Naturally, you will not sue,
> Should things get worse after this,
> PCR
> pcrrcp@netzero.net

--------
I want change extensions of all .zip files in the current directory from
..zip to .bak.
Should I specify full path to this folder?

RENAME C:\My Documents\Folder *.zip *.bak

S.
 
F

Franc Zabkar

On Sat, 6 Oct 2007 02:05:05 +0300, "SANTANDER"
<santander@microsoft.news> put finger to keyboard and composed:

>
>"PCR" <pcrrcp@netzero.net> wrote in message
>news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
>> SANTANDER wrote:
>> | Could anyone recommend handy File Extension Changer utility, to
>> | change files extension? Renaming manually via enable 'Hide file
>> | extensions for known file types' option in 'Folder Options' menu is
>> | not very convenient since if then whenever we want to rename a
>> | certain file, we will always have to include the extension for it, or
>> | else we will get a warning prompt.
>>
>> What extensions do you want to change? The warning prompt is important
>> because changing extensions can cause a program no longer to function as
>> expected when clicked.
>>
>> However, to avoid the warning, you can do it in a Windows DOS box...
>>
>> (1) "START button, Programs, MS-DOS Prompt"
>> (2) REN C:\Folder\Filename.txt Filename.newext
>>
>> C:\>REN /?
>> Renames a file/directory or files/directories.
>>
>> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
>> filename2]
>> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
>> filename2]
>>
>> Note that you cannot specify a new drive or path for your destination.
>>
>>
>> | Thanks
>>
>> --
>> Thanks or Good Luck,
>> There may be humor in this post, and,
>> Naturally, you will not sue,
>> Should things get worse after this,
>> PCR
>> pcrrcp@netzero.net

>--------
>I want change extensions of all .zip files in the current directory from
>.zip to .bak.
>Should I specify full path to this folder?
>
>RENAME C:\My Documents\Folder *.zip *.bak
>
>S.


File names with spaces need to be enclosed in quotes.

ren "C:\My Documents\Folder" "*.zip" "*.bak"

- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
 
B

Bill Blanton

"Franc Zabkar" <fzabkar@iinternode.on.net> wrote in message news:h3kdg3dsf0n0egvb5jttl59pn64pqk6quq@4ax.com...
> On Sat, 6 Oct 2007 02:05:05 +0300, "SANTANDER"
> <santander@microsoft.news> put finger to keyboard and composed:
>
>>
>>"PCR" <pcrrcp@netzero.net> wrote in message


>>> (1) "START button, Programs, MS-DOS Prompt"
>>> (2) REN C:\Folder\Filename.txt Filename.newext
>>>
>>> C:\>REN /?
>>> Renames a file/directory or files/directories.
>>>
>>> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
>>> filename2]
>>> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
>>> filename2]
>>>
>>> Note that you cannot specify a new drive or path for your destination.


>>I want change extensions of all .zip files in the current directory from
>>.zip to .bak.
>>Should I specify full path to this folder?


If working in the current dir you do not need to specify a path. The
current dir is the default.

ren *.zip *.bak


>>
>>RENAME C:\My Documents\Folder *.zip *.bak
>>
>>S.

>
> File names with spaces need to be enclosed in quotes.
>
> ren "C:\My Documents\Folder" "*.zip" "*.bak"


Or-

ren "C:\My Documents\Folder\*.zip" *.bak
 
P

PCR

Franc Zabkar wrote:
| On Sat, 6 Oct 2007 02:05:05 +0300, "SANTANDER"
| <santander@microsoft.news> put finger to keyboard and composed:
|
|>
|>"PCR" <pcrrcp@netzero.net> wrote in message
|>news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
|>> SANTANDER wrote:
|>> | Could anyone recommend handy File Extension Changer utility, to
|>> | change files extension? Renaming manually via enable 'Hide file
|>> | extensions for known file types' option in 'Folder Options' menu
|>> | is not very convenient since if then whenever we want to rename a
|>> | certain file, we will always have to include the extension for
|>> | it, or else we will get a warning prompt.
|>>
|>> What extensions do you want to change? The warning prompt is
|>> important because changing extensions can cause a program no longer
|>> to function as expected when clicked.
|>>
|>> However, to avoid the warning, you can do it in a Windows DOS box...
|>>
|>> (1) "START button, Programs, MS-DOS Prompt"
|>> (2) REN C:\Folder\Filename.txt Filename.newext
|>>
|>> C:\>REN /?
|>> Renames a file/directory or files/directories.
|>>
|>> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
|>> filename2]
|>> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
|>> filename2]
|>>
|>> Note that you cannot specify a new drive or path for your
|>> destination.
|>>
|>>
|>> | Thanks
|>>
|>> --
|>> Thanks or Good Luck,
|>> There may be humor in this post, and,
|>> Naturally, you will not sue,
|>> Should things get worse after this,
|>> PCR
|>> pcrrcp@netzero.net
|>--------
|>I want change extensions of all .zip files in the current directory
|>from .zip to .bak.
|>Should I specify full path to this folder?
|>
|>RENAME C:\My Documents\Folder *.zip *.bak
|>
|>S.
|
| File names with spaces need to be enclosed in quotes.
|
| ren "C:\My Documents\Folder" "*.zip" "*.bak"

That's true about quotes. Any file or folder that is not in the DOS
format... Filename.ext (8.3) & no space... would need the quotes in a
DOS box.

However, the line you posted actually results in the folder getting
renamed to "Folder.zip", & the files inside remain unchanged. It is as
Blanton said...

ren "C:\My Documents\Folder\*.zip" *.bak

That leaves the folder alone & renames the .zip's inside to .bak's.

| - Franc Zabkar
| --
| Please remove one 'i' from my address when replying by email.

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
P

PCR

SANTANDER wrote:
| "PCR" <pcrrcp@netzero.net> wrote in message
| news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
|> SANTANDER wrote:
|> | Could anyone recommend handy File Extension Changer utility, to
|> | change files extension? Renaming manually via enable 'Hide file
|> | extensions for known file types' option in 'Folder Options' menu is
|> | not very convenient since if then whenever we want to rename a
|> | certain file, we will always have to include the extension for it,
|> | or else we will get a warning prompt.
|>
|> What extensions do you want to change? The warning prompt is
|> important because changing extensions can cause a program no longer
|> to function as expected when clicked.
|>
|> However, to avoid the warning, you can do it in a Windows DOS box...
|>
|> (1) "START button, Programs, MS-DOS Prompt"
|> (2) REN C:\Folder\Filename.txt Filename.newext
|>
|> C:\>REN /?
|> Renames a file/directory or files/directories.
|>
|> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
|> filename2]
|> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
|> filename2]
|>
|> Note that you cannot specify a new drive or path for your
|> destination.
|>
|>
|> | Thanks
|>
|> --
|> Thanks or Good Luck,
|> There may be humor in this post, and,
|> Naturally, you will not sue,
|> Should things get worse after this,
|> PCR
|> pcrrcp@netzero.net
| --------
| I want change extensions of all .zip files in the current directory
| from .zip to .bak.
| Should I specify full path to this folder?
|
| RENAME C:\My Documents\Folder *.zip *.bak

As Zabcar said, you would need quotes around "C:\My Documents\Folder",
because it has a non-DOS component. To be free of quotes, all components
must be in the 8.3 DOS format-- Filename.ext & containing no space or
certain other special characters.

HOWEVER, that line still doesn't work, & would just rename "Folder" to
be "Folder.zip". You must do as Blanton said & include a final
backslash...

REN "C:\My Documents\Folder\*.zip" *.bak

....OR (because it is the current folder)...

REN *.zip *.bak

| S.

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
P

PCR

PCR wrote:
| SANTANDER wrote:
|| "PCR" <pcrrcp@netzero.net> wrote in message
|| news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
||> SANTANDER wrote:
||> | Could anyone recommend handy File Extension Changer utility, to
||> | change files extension? Renaming manually via enable 'Hide file
||> | extensions for known file types' option in 'Folder Options' menu
||> | is not very convenient since if then whenever we want to rename a
||> | certain file, we will always have to include the extension for it,
||> | or else we will get a warning prompt.
||>
||> What extensions do you want to change? The warning prompt is
||> important because changing extensions can cause a program no longer
||> to function as expected when clicked.
||>
||> However, to avoid the warning, you can do it in a Windows DOS box...
||>
||> (1) "START button, Programs, MS-DOS Prompt"
||> (2) REN C:\Folder\Filename.txt Filename.newext
||>
||> C:\>REN /?
||> Renames a file/directory or files/directories.
||>
||> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
||> filename2]
||> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
||> filename2]
||>
||> Note that you cannot specify a new drive or path for your
||> destination.
||>
||>
||> | Thanks
||>
||> --
||> Thanks or Good Luck,
||> There may be humor in this post, and,
||> Naturally, you will not sue,
||> Should things get worse after this,
||> PCR
||> pcrrcp@netzero.net
|| --------
|| I want change extensions of all .zip files in the current directory
|| from .zip to .bak.
|| Should I specify full path to this folder?
||
|| RENAME C:\My Documents\Folder *.zip *.bak
|
| As Zabcar said, you would need quotes around "C:\My Documents\Folder",
| because it has a non-DOS component. To be free of quotes, all
| components must be in the 8.3 DOS format-- Filename.ext & containing
| no space or certain other special characters.

Actually, as Zabcar first said, it is only spaces that seem to matter in
the REN command. If any folder or file name in the Path contains a
space, enclose the whole Path in quotes, as said. But...

REN C:\Folder\Filename.ext LongFileName.LongExtension

....seems to work fine in a DOS box.

| HOWEVER, that line still doesn't work, & would just rename "Folder" to
| be "Folder.zip". You must do as Blanton said & include a final
| backslash...
|
| REN "C:\My Documents\Folder\*.zip" *.bak
|
| ...OR (because it is the current folder)...
|
| REN *.zip *.bak

I hope you will remember that these were .zip files. Some day you may
want to rename them back-- because the extension has importance in
Windows.

(a) Why are you renaming them?
(b) Maybe rename them to... *.bak.zip.
That way they still are .zip's.
(c) Or, just create a folder named "Backup Zips",
& put them into there w/o renaming them at all.

|| S.
|
| --
| Thanks or Good Luck,
| There may be humor in this post, and,
| Naturally, you will not sue,
| Should things get worse after this,
| PCR
| pcrrcp@netzero.net

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
S

SANTANDER

"PCR" <pcrrcp@netzero.net> wrote in message
news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
> SANTANDER wrote:
> | "PCR" <pcrrcp@netzero.net> wrote in message
> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
> |> SANTANDER wrote:
> |> | Could anyone recommend handy File Extension Changer utility, to
> |> | change files extension? Renaming manually via enable 'Hide file
> |> | extensions for known file types' option in 'Folder Options' menu is
> |> | not very convenient since if then whenever we want to rename a
> |> | certain file, we will always have to include the extension for it,
> |> | or else we will get a warning prompt.
> |>
> |> What extensions do you want to change? The warning prompt is
> |> important because changing extensions can cause a program no longer
> |> to function as expected when clicked.
> |>
> |> However, to avoid the warning, you can do it in a Windows DOS box...
> |>
> |> (1) "START button, Programs, MS-DOS Prompt"
> |> (2) REN C:\Folder\Filename.txt Filename.newext
> |>
> |> C:\>REN /?
> |> Renames a file/directory or files/directories.
> |>
> |> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
> |> filename2]
> |> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
> |> filename2]
> |>
> |> Note that you cannot specify a new drive or path for your
> |> destination.
> |>
> |>
> |> | Thanks
> |>
> |> --
> |> Thanks or Good Luck,
> |> There may be humor in this post, and,
> |> Naturally, you will not sue,
> |> Should things get worse after this,
> |> PCR
> |> pcrrcp@netzero.net
> | --------
> | I want change extensions of all .zip files in the current directory
> | from .zip to .bak.
> | Should I specify full path to this folder?
> |
> | RENAME C:\My Documents\Folder *.zip *.bak


> As Zabcar said, you would need quotes around "C:\My Documents\Folder",
> because it has a non-DOS component. To be free of quotes, all components
> must be in the 8.3 DOS format-- Filename.ext & containing no space or
> certain other special characters.


> HOWEVER, that line still doesn't work, & would just rename "Folder" to
> be "Folder.zip". You must do as Blanton said & include a final
> backslash...


> REN "C:\My Documents\Folder\*.zip" *.bak


> ...OR (because it is the current folder)...


> REN *.zip *.bak
>

--------------------

It is helpful to know DOS however, but it is extremelly inconvenient to work
with it nowadays.
So I would try .BAT file which will do renaming, and will be much easier to
work. How should look this BAT file code?

Thanks,
S.
 
P

PCR

SANTANDER wrote:
| "PCR" <pcrrcp@netzero.net> wrote in message
| news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
|> SANTANDER wrote:
|> | "PCR" <pcrrcp@netzero.net> wrote in message
|> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
|> |> SANTANDER wrote:
|> |> | Could anyone recommend handy File Extension Changer utility, to
|> |> | change files extension? Renaming manually via enable 'Hide file
|> |> | extensions for known file types' option in 'Folder Options'
|> |> | menu is not very convenient since if then whenever we want to
|> |> | rename a certain file, we will always have to include the
|> |> | extension for it, or else we will get a warning prompt.
|> |>
|> |> What extensions do you want to change? The warning prompt is
|> |> important because changing extensions can cause a program no
|> |> longer to function as expected when clicked.
|> |>
|> |> However, to avoid the warning, you can do it in a Windows DOS
|> |> box...
|> |>
|> |> (1) "START button, Programs, MS-DOS Prompt"
|> |> (2) REN C:\Folder\Filename.txt Filename.newext
|> |>
|> |> C:\>REN /?
|> |> Renames a file/directory or files/directories.
|> |>
|> |> RENAME [drive:][path][directoryname1 | filename1] [directoryname2
|> |> | filename2]
|> |> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
|> |> filename2]
|> |>
|> |> Note that you cannot specify a new drive or path for your
|> |> destination.
|> |>
|> |>
|> |> | Thanks
|> |>
|> |> --
|> |> Thanks or Good Luck,
|> |> There may be humor in this post, and,
|> |> Naturally, you will not sue,
|> |> Should things get worse after this,
|> |> PCR
|> |> pcrrcp@netzero.net
|> | --------
|> | I want change extensions of all .zip files in the current directory
|> | from .zip to .bak.
|> | Should I specify full path to this folder?
|> |
|> | RENAME C:\My Documents\Folder *.zip *.bak
|
|> As Zabcar said, you would need quotes around "C:\My
|> Documents\Folder", because it has a non-DOS component. To be free of
|> quotes, all components must be in the 8.3 DOS format-- Filename.ext
|> & containing no space or certain other special characters.
|
|> HOWEVER, that line still doesn't work, & would just rename "Folder"
|> to be "Folder.zip". You must do as Blanton said & include a final
|> backslash...
|
|> REN "C:\My Documents\Folder\*.zip" *.bak
|
|> ...OR (because it is the current folder)...
|
|> REN *.zip *.bak
|>
| --------------------
|
| It is helpful to know DOS however, but it is extremelly inconvenient
| to work with it nowadays.
| So I would try .BAT file which will do renaming, and will be much
| easier to work. How should look this BAT file code?

I swore 7 years ago I WOULD learn to write complex .bat's, & that still
stands-- but probably Zabcar & Blanton have beaten me to it. A simple
one is just what we've said...

REN *.zip *.bak

(You'd have to be in the proper folder.
Whichever is the current folder is affected.
And I'd strongly recommend...
REN *.zip *.bak.zip
.... instead!)

--or---

REN "C:\My Documents\Folder\*.zip" *.bak

(You may be in any folder.
Only .zip's in "C:\My Documents\Folder" are renamed.
Again, I'd prefer to see...
REN "C:\My Documents\Folder\*.zip" *.bak.zip
.... instead!)

Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.

| Thanks,
| S.

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
F

Franc Zabkar

On Sat, 6 Oct 2007 16:23:16 -0400, "PCR" <pcrrcp@netzero.net> put
finger to keyboard and composed:

>Franc Zabkar wrote:
>| On Sat, 6 Oct 2007 02:05:05 +0300, "SANTANDER"
>| <santander@microsoft.news> put finger to keyboard and composed:
>|
>|>
>|>"PCR" <pcrrcp@netzero.net> wrote in message
>|>news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
>|>> SANTANDER wrote:
>|>> | Could anyone recommend handy File Extension Changer utility, to
>|>> | change files extension? Renaming manually via enable 'Hide file
>|>> | extensions for known file types' option in 'Folder Options' menu
>|>> | is not very convenient since if then whenever we want to rename a
>|>> | certain file, we will always have to include the extension for
>|>> | it, or else we will get a warning prompt.
>|>>
>|>> What extensions do you want to change? The warning prompt is
>|>> important because changing extensions can cause a program no longer
>|>> to function as expected when clicked.
>|>>
>|>> However, to avoid the warning, you can do it in a Windows DOS box...
>|>>
>|>> (1) "START button, Programs, MS-DOS Prompt"
>|>> (2) REN C:\Folder\Filename.txt Filename.newext
>|>>
>|>> C:\>REN /?
>|>> Renames a file/directory or files/directories.
>|>>
>|>> RENAME [drive:][path][directoryname1 | filename1] [directoryname2 |
>|>> filename2]
>|>> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
>|>> filename2]
>|>>
>|>> Note that you cannot specify a new drive or path for your
>|>> destination.
>|>>
>|>>
>|>> | Thanks
>|>>
>|>> --
>|>> Thanks or Good Luck,
>|>> There may be humor in this post, and,
>|>> Naturally, you will not sue,
>|>> Should things get worse after this,
>|>> PCR
>|>> pcrrcp@netzero.net
>|>--------
>|>I want change extensions of all .zip files in the current directory
>|>from .zip to .bak.
>|>Should I specify full path to this folder?
>|>
>|>RENAME C:\My Documents\Folder *.zip *.bak
>|>
>|>S.
>|
>| File names with spaces need to be enclosed in quotes.
>|
>| ren "C:\My Documents\Folder" "*.zip" "*.bak"
>
>That's true about quotes. Any file or folder that is not in the DOS
>format... Filename.ext (8.3) & no space... would need the quotes in a
>DOS box.
>
>However, the line you posted actually results in the folder getting
>renamed to "Folder.zip", & the files inside remain unchanged. It is as
>Blanton said...
>
>ren "C:\My Documents\Folder\*.zip" *.bak
>
>That leaves the folder alone & renames the .zip's inside to .bak's.


Sorry. That was a very bad brain fart.

- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
 
S

SANTANDER

"PCR" <pcrrcp@netzero.net> wrote in message
news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
> SANTANDER wrote:
> | "PCR" <pcrrcp@netzero.net> wrote in message
> | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
> |> SANTANDER wrote:
> |> | "PCR" <pcrrcp@netzero.net> wrote in message
> |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
> |> |> SANTANDER wrote:
> |> |> | Could anyone recommend handy File Extension Changer utility, to
> |> |> | change files extension? Renaming manually via enable 'Hide file
> |> |> | extensions for known file types' option in 'Folder Options'
> |> |> | menu is not very convenient since if then whenever we want to
> |> |> | rename a certain file, we will always have to include the
> |> |> | extension for it, or else we will get a warning prompt.
> |> |>
> |> |> What extensions do you want to change? The warning prompt is
> |> |> important because changing extensions can cause a program no
> |> |> longer to function as expected when clicked.
> |> |>
> |> |> However, to avoid the warning, you can do it in a Windows DOS
> |> |> box...
> |> |>
> |> |> (1) "START button, Programs, MS-DOS Prompt"
> |> |> (2) REN C:\Folder\Filename.txt Filename.newext
> |> |>
> |> |> C:\>REN /?
> |> |> Renames a file/directory or files/directories.
> |> |>
> |> |> RENAME [drive:][path][directoryname1 | filename1] [directoryname2
> |> |> | filename2]
> |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
> |> |> filename2]
> |> |>
> |> |> Note that you cannot specify a new drive or path for your
> |> |> destination.
> |> |>
> |> |>
> |> |> | Thanks
> |> |>
> |> |> --
> |> |> Thanks or Good Luck,
> |> |> There may be humor in this post, and,
> |> |> Naturally, you will not sue,
> |> |> Should things get worse after this,
> |> |> PCR
> |> |> pcrrcp@netzero.net
> |> | --------
> |> | I want change extensions of all .zip files in the current directory
> |> | from .zip to .bak.
> |> | Should I specify full path to this folder?
> |> |
> |> | RENAME C:\My Documents\Folder *.zip *.bak
> |
> |> As Zabcar said, you would need quotes around "C:\My
> |> Documents\Folder", because it has a non-DOS component. To be free of
> |> quotes, all components must be in the 8.3 DOS format-- Filename.ext
> |> & containing no space or certain other special characters.
> |
> |> HOWEVER, that line still doesn't work, & would just rename "Folder"
> |> to be "Folder.zip". You must do as Blanton said & include a final
> |> backslash...
> |
> |> REN "C:\My Documents\Folder\*.zip" *.bak
> |
> |> ...OR (because it is the current folder)...
> |
> |> REN *.zip *.bak
> |>
> | --------------------
> |
> | It is helpful to know DOS however, but it is extremelly inconvenient
> | to work with it nowadays.
> | So I would try .BAT file which will do renaming, and will be much
> | easier to work. How should look this BAT file code?
>
> I swore 7 years ago I WOULD learn to write complex .bat's, & that still
> stands-- but probably Zabcar & Blanton have beaten me to it. A simple
> one is just what we've said...
>
> REN *.zip *.bak
>
> (You'd have to be in the proper folder.
> Whichever is the current folder is affected.
> And I'd strongly recommend...
> REN *.zip *.bak.zip
> ... instead!)
>
> --or---
>
> REN "C:\My Documents\Folder\*.zip" *.bak
>
> (You may be in any folder.
> Only .zip's in "C:\My Documents\Folder" are renamed.
> Again, I'd prefer to see...
> REN "C:\My Documents\Folder\*.zip" *.bak.zip
> ... instead!)
>
> Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
>
> | Thanks,
> | S.
>

-----------
and what if rename zip with other extension, jpg? Same thing, .jpg dot zip?

REN "C:\My Documents\Folder\*.zip" *.jpg.zip
Is the changing extension back to original always safe? Just tried once
rename(manually) vbs file to pdf, then back to vbs and get script file
damaged, its different size.

Thanks
 
M

MEB

Personally, I always used either copy or xcopy to achieve the renaming of
files. Though that keeps a copy of the original, adding a del line (del
%folder line%\*.extension, or previously properly formed variables are
defined, del %1%2{etc.}\*.extension) can remove those now defunct copies.

--
MEB
http://peoplescounsel.orgfree.com
________


"SANTANDER" <santander@microsoft.news> wrote in message
news:eML%23hTOCIHA.4496@TK2MSFTNGP06.phx.gbl...
|
| "PCR" <pcrrcp@netzero.net> wrote in message
| news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
| > SANTANDER wrote:
| > | "PCR" <pcrrcp@netzero.net> wrote in message
| > | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
| > |> SANTANDER wrote:
| > |> | "PCR" <pcrrcp@netzero.net> wrote in message
| > |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
| > |> |> SANTANDER wrote:
| > |> |> | Could anyone recommend handy File Extension Changer utility, to
| > |> |> | change files extension? Renaming manually via enable 'Hide file
| > |> |> | extensions for known file types' option in 'Folder Options'
| > |> |> | menu is not very convenient since if then whenever we want to
| > |> |> | rename a certain file, we will always have to include the
| > |> |> | extension for it, or else we will get a warning prompt.
| > |> |>
| > |> |> What extensions do you want to change? The warning prompt is
| > |> |> important because changing extensions can cause a program no
| > |> |> longer to function as expected when clicked.
| > |> |>
| > |> |> However, to avoid the warning, you can do it in a Windows DOS
| > |> |> box...
| > |> |>
| > |> |> (1) "START button, Programs, MS-DOS Prompt"
| > |> |> (2) REN C:\Folder\Filename.txt Filename.newext
| > |> |>
| > |> |> C:\>REN /?
| > |> |> Renames a file/directory or files/directories.
| > |> |>
| > |> |> RENAME [drive:][path][directoryname1 | filename1] [directoryname2
| > |> |> | filename2]
| > |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
| > |> |> filename2]
| > |> |>
| > |> |> Note that you cannot specify a new drive or path for your
| > |> |> destination.
| > |> |>
| > |> |>
| > |> |> | Thanks
| > |> |>
| > |> |> --
| > |> |> Thanks or Good Luck,
| > |> |> There may be humor in this post, and,
| > |> |> Naturally, you will not sue,
| > |> |> Should things get worse after this,
| > |> |> PCR
| > |> |> pcrrcp@netzero.net
| > |> | --------
| > |> | I want change extensions of all .zip files in the current directory
| > |> | from .zip to .bak.
| > |> | Should I specify full path to this folder?
| > |> |
| > |> | RENAME C:\My Documents\Folder *.zip *.bak
| > |
| > |> As Zabcar said, you would need quotes around "C:\My
| > |> Documents\Folder", because it has a non-DOS component. To be free of
| > |> quotes, all components must be in the 8.3 DOS format-- Filename.ext
| > |> & containing no space or certain other special characters.
| > |
| > |> HOWEVER, that line still doesn't work, & would just rename "Folder"
| > |> to be "Folder.zip". You must do as Blanton said & include a final
| > |> backslash...
| > |
| > |> REN "C:\My Documents\Folder\*.zip" *.bak
| > |
| > |> ...OR (because it is the current folder)...
| > |
| > |> REN *.zip *.bak
| > |>
| > | --------------------
| > |
| > | It is helpful to know DOS however, but it is extremelly inconvenient
| > | to work with it nowadays.
| > | So I would try .BAT file which will do renaming, and will be much
| > | easier to work. How should look this BAT file code?
| >
| > I swore 7 years ago I WOULD learn to write complex .bat's, & that still
| > stands-- but probably Zabcar & Blanton have beaten me to it. A simple
| > one is just what we've said...
| >
| > REN *.zip *.bak
| >
| > (You'd have to be in the proper folder.
| > Whichever is the current folder is affected.
| > And I'd strongly recommend...
| > REN *.zip *.bak.zip
| > ... instead!)
| >
| > --or---
| >
| > REN "C:\My Documents\Folder\*.zip" *.bak
| >
| > (You may be in any folder.
| > Only .zip's in "C:\My Documents\Folder" are renamed.
| > Again, I'd prefer to see...
| > REN "C:\My Documents\Folder\*.zip" *.bak.zip
| > ... instead!)
| >
| > Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
| >
| > | Thanks,
| > | S.
| >
| -----------
| and what if rename zip with other extension, jpg? Same thing, .jpg dot
zip?
|
| REN "C:\My Documents\Folder\*.zip" *.jpg.zip
| Is the changing extension back to original always safe? Just tried once
| rename(manually) vbs file to pdf, then back to vbs and get script file
| damaged, its different size.
|
| Thanks
|
 
S

SANTANDER

"MEB" <meb@not here@hotmail.com> wrote in message
news:uLQm$vQCIHA.1056@TK2MSFTNGP03.phx.gbl...
> Personally, I always used either copy or xcopy to achieve the renaming of
> files. Though that keeps a copy of the original, adding a del line (del
> %folder line%\*.extension, or previously properly formed variables are
> defined, del %1%2{etc.}\*.extension) can remove those now defunct copies.
>
> --
> MEB
> http://peoplescounsel.orgfree.com
> ________
>
>
> "SANTANDER" <santander@microsoft.news> wrote in message
> news:eML%23hTOCIHA.4496@TK2MSFTNGP06.phx.gbl...
> |
> | "PCR" <pcrrcp@netzero.net> wrote in message
> | news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
> | > SANTANDER wrote:
> | > | "PCR" <pcrrcp@netzero.net> wrote in message
> | > | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
> | > |> SANTANDER wrote:
> | > |> | "PCR" <pcrrcp@netzero.net> wrote in message
> | > |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
> | > |> |> SANTANDER wrote:
> | > |> |> | Could anyone recommend handy File Extension Changer utility,

to
> | > |> |> | change files extension? Renaming manually via enable 'Hide

file
> | > |> |> | extensions for known file types' option in 'Folder Options'
> | > |> |> | menu is not very convenient since if then whenever we want to
> | > |> |> | rename a certain file, we will always have to include the
> | > |> |> | extension for it, or else we will get a warning prompt.
> | > |> |>
> | > |> |> What extensions do you want to change? The warning prompt is
> | > |> |> important because changing extensions can cause a program no
> | > |> |> longer to function as expected when clicked.
> | > |> |>
> | > |> |> However, to avoid the warning, you can do it in a Windows DOS
> | > |> |> box...
> | > |> |>
> | > |> |> (1) "START button, Programs, MS-DOS Prompt"
> | > |> |> (2) REN C:\Folder\Filename.txt Filename.newext
> | > |> |>
> | > |> |> C:\>REN /?
> | > |> |> Renames a file/directory or files/directories.
> | > |> |>
> | > |> |> RENAME [drive:][path][directoryname1 | filename1]

[directoryname2
> | > |> |> | filename2]
> | > |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
> | > |> |> filename2]
> | > |> |>
> | > |> |> Note that you cannot specify a new drive or path for your
> | > |> |> destination.
> | > |> |>
> | > |> |>
> | > |> |> | Thanks
> | > |> |>
> | > |> |> --
> | > |> |> Thanks or Good Luck,
> | > |> |> There may be humor in this post, and,
> | > |> |> Naturally, you will not sue,
> | > |> |> Should things get worse after this,
> | > |> |> PCR
> | > |> |> pcrrcp@netzero.net
> | > |> | --------
> | > |> | I want change extensions of all .zip files in the current

directory
> | > |> | from .zip to .bak.
> | > |> | Should I specify full path to this folder?
> | > |> |
> | > |> | RENAME C:\My Documents\Folder *.zip *.bak
> | > |
> | > |> As Zabcar said, you would need quotes around "C:\My
> | > |> Documents\Folder", because it has a non-DOS component. To be free

of
> | > |> quotes, all components must be in the 8.3 DOS format-- Filename.ext
> | > |> & containing no space or certain other special characters.
> | > |
> | > |> HOWEVER, that line still doesn't work, & would just rename "Folder"
> | > |> to be "Folder.zip". You must do as Blanton said & include a final
> | > |> backslash...
> | > |
> | > |> REN "C:\My Documents\Folder\*.zip" *.bak
> | > |
> | > |> ...OR (because it is the current folder)...
> | > |
> | > |> REN *.zip *.bak
> | > |>
> | > | --------------------
> | > |
> | > | It is helpful to know DOS however, but it is extremelly inconvenient
> | > | to work with it nowadays.
> | > | So I would try .BAT file which will do renaming, and will be much
> | > | easier to work. How should look this BAT file code?
> | >
> | > I swore 7 years ago I WOULD learn to write complex .bat's, & that

still
> | > stands-- but probably Zabcar & Blanton have beaten me to it. A simple
> | > one is just what we've said...
> | >
> | > REN *.zip *.bak
> | >
> | > (You'd have to be in the proper folder.
> | > Whichever is the current folder is affected.
> | > And I'd strongly recommend...
> | > REN *.zip *.bak.zip
> | > ... instead!)
> | >
> | > --or---
> | >
> | > REN "C:\My Documents\Folder\*.zip" *.bak
> | >
> | > (You may be in any folder.
> | > Only .zip's in "C:\My Documents\Folder" are renamed.
> | > Again, I'd prefer to see...
> | > REN "C:\My Documents\Folder\*.zip" *.bak.zip
> | > ... instead!)
> | >
> | > Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
> | >
> | > | Thanks,
> | > | S.
> | >
> | -----------
> | and what if rename zip with other extension, jpg? Same thing, .jpg dot
> zip?
> |
> | REN "C:\My Documents\Folder\*.zip" *.jpg.zip
> | Is the changing extension back to original always safe? Just tried once
> | rename(manually) vbs file to pdf, then back to vbs and get script file
> | damaged, its different size.
> |
> | Thanks

----------

not clear. How to achieve this with bat script or vbscript? ( but not in DOS
box)

thanks.
 
P

PCR

Franc Zabkar wrote:
| On Sat, 6 Oct 2007 16:23:16 -0400, "PCR" <pcrrcp@netzero.net> put
| finger to keyboard and composed:
|
|>Franc Zabkar wrote:
|>| On Sat, 6 Oct 2007 02:05:05 +0300, "SANTANDER"
|>| <santander@microsoft.news> put finger to keyboard and composed:
|>|
|>|>
|>|>"PCR" <pcrrcp@netzero.net> wrote in message
|>|>news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
|>|>> SANTANDER wrote:
|>|>> | Could anyone recommend handy File Extension Changer utility, to
|>|>> | change files extension? Renaming manually via enable 'Hide file
|>|>> | extensions for known file types' option in 'Folder Options' menu
|>|>> | is not very convenient since if then whenever we want to rename
|>|>> | a certain file, we will always have to include the extension for
|>|>> | it, or else we will get a warning prompt.
|>|>>
|>|>> What extensions do you want to change? The warning prompt is
|>|>> important because changing extensions can cause a program no
|>|>> longer to function as expected when clicked.
|>|>>
|>|>> However, to avoid the warning, you can do it in a Windows DOS
|>|>> box...
|>|>>
|>|>> (1) "START button, Programs, MS-DOS Prompt"
|>|>> (2) REN C:\Folder\Filename.txt Filename.newext
|>|>>
|>|>> C:\>REN /?
|>|>> Renames a file/directory or files/directories.
|>|>>
|>|>> RENAME [drive:][path][directoryname1 | filename1] [directoryname2
|>|>> | filename2]
|>|>> REN [drive:][path][directoryname1 | filename1] [directoryname2 |
|>|>> filename2]
|>|>>
|>|>> Note that you cannot specify a new drive or path for your
|>|>> destination.
|>|>>
|>|>>
|>|>> | Thanks
|>|>>
|>|>> --
|>|>> Thanks or Good Luck,
|>|>> There may be humor in this post, and,
|>|>> Naturally, you will not sue,
|>|>> Should things get worse after this,
|>|>> PCR
|>|>> pcrrcp@netzero.net
|>|>--------
|>|>I want change extensions of all .zip files in the current directory
|>|>from .zip to .bak.
|>|>Should I specify full path to this folder?
|>|>
|>|>RENAME C:\My Documents\Folder *.zip *.bak
|>|>
|>|>S.
|>|
|>| File names with spaces need to be enclosed in quotes.
|>|
|>| ren "C:\My Documents\Folder" "*.zip" "*.bak"
|>
|>That's true about quotes. Any file or folder that is not in the DOS
|>format... Filename.ext (8.3) & no space... would need the quotes in a
|>DOS box.
|>
|>However, the line you posted actually results in the folder getting
|>renamed to "Folder.zip", & the files inside remain unchanged. It is as
|>Blanton said...
|>
|>ren "C:\My Documents\Folder\*.zip" *.bak
|>
|>That leaves the folder alone & renames the .zip's inside to .bak's.
|
| Sorry. That was a very bad brain fart.

OK, & I see you just added quotes to the existing posted line. DOS is
very strict in its requirements, even Windows DOS (in a box). But you
were right to mention only spaces in the name would require the quotes
to be used. The 8.3 requirement for DOS names (that I added to it) only
exists in Real DOS.

| - Franc Zabkar
| --
| Please remove one 'i' from my address when replying by email.

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
P

PCR

SANTANDER wrote:
| "PCR" <pcrrcp@netzero.net> wrote in message
| news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
|> SANTANDER wrote:
|> | "PCR" <pcrrcp@netzero.net> wrote in message
|> | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
|> |> SANTANDER wrote:
|> |> | "PCR" <pcrrcp@netzero.net> wrote in message
|> |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
|> |> |> SANTANDER wrote:
|> |> |> | Could anyone recommend handy File Extension Changer utility,
|> |> |> | to change files extension? Renaming manually via enable
|> |> |> | 'Hide file extensions for known file types' option in
|> |> |> | 'Folder Options' menu is not very convenient since if then
|> |> |> | whenever we want to rename a certain file, we will always
|> |> |> | have to include the extension for it, or else we will get a
|> |> |> | warning prompt.
|> |> |>
|> |> |> What extensions do you want to change? The warning prompt is
|> |> |> important because changing extensions can cause a program no
|> |> |> longer to function as expected when clicked.
|> |> |>
|> |> |> However, to avoid the warning, you can do it in a Windows DOS
|> |> |> box...
|> |> |>
|> |> |> (1) "START button, Programs, MS-DOS Prompt"
|> |> |> (2) REN C:\Folder\Filename.txt Filename.newext
|> |> |>
|> |> |> C:\>REN /?
|> |> |> Renames a file/directory or files/directories.
|> |> |>
|> |> |> RENAME [drive:][path][directoryname1 | filename1]
|> |> |> [directoryname2
|> |> |> | filename2]
|> |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2
|> |> |> | filename2]
|> |> |>
|> |> |> Note that you cannot specify a new drive or path for your
|> |> |> destination.
|> |> |>
|> |> |>
|> |> |> | Thanks
|> |> |>
|> |> |> --
|> |> |> Thanks or Good Luck,
|> |> |> There may be humor in this post, and,
|> |> |> Naturally, you will not sue,
|> |> |> Should things get worse after this,
|> |> |> PCR
|> |> |> pcrrcp@netzero.net
|> |> | --------
|> |> | I want change extensions of all .zip files in the current
|> |> | directory from .zip to .bak.
|> |> | Should I specify full path to this folder?
|> |> |
|> |> | RENAME C:\My Documents\Folder *.zip *.bak
|> |
|> |> As Zabcar said, you would need quotes around "C:\My
|> |> Documents\Folder", because it has a non-DOS component. To be free
|> |> of quotes, all components must be in the 8.3 DOS format--
|> |> Filename.ext & containing no space or certain other special
|> |> characters.
|> |
|> |> HOWEVER, that line still doesn't work, & would just rename
|> |> "Folder" to be "Folder.zip". You must do as Blanton said &
|> |> include a final backslash...
|> |
|> |> REN "C:\My Documents\Folder\*.zip" *.bak
|> |
|> |> ...OR (because it is the current folder)...
|> |
|> |> REN *.zip *.bak
|> |>
|> | --------------------
|> |
|> | It is helpful to know DOS however, but it is extremelly
|> | inconvenient to work with it nowadays.
|> | So I would try .BAT file which will do renaming, and will be much
|> | easier to work. How should look this BAT file code?
|>
|> I swore 7 years ago I WOULD learn to write complex .bat's, & that
|> still stands-- but probably Zabcar & Blanton have beaten me to it. A
|> simple one is just what we've said...
|>
|> REN *.zip *.bak
|>
|> (You'd have to be in the proper folder.
|> Whichever is the current folder is affected.
|> And I'd strongly recommend...
|> REN *.zip *.bak.zip
|> ... instead!)
|>
|> --or---
|>
|> REN "C:\My Documents\Folder\*.zip" *.bak
|>
|> (You may be in any folder.
|> Only .zip's in "C:\My Documents\Folder" are renamed.
|> Again, I'd prefer to see...
|> REN "C:\My Documents\Folder\*.zip" *.bak.zip
|> ... instead!)
|>
|> Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
|>
|> | Thanks,
|> | S.
|>
| -----------
| and what if rename zip with other extension, jpg? Same thing, .jpg
| dot zip?

I still want to know why you are doing these things? Why can't you just
create a folder named "Backup Zips", & just copy your .zip's into
there-- w/o renaming them?

| REN "C:\My Documents\Folder\*.zip" *.jpg.zip

Actually -- on 2nd thought -- this isn't a great idea, if you are
intending to REN the files in a folder more than once. "Filename.zip"
would become "Filename.jpg.zip" the 1st time. Next time, it would become
""Filename.jpg.jpg.zip"-- & so on! Each time you do the REN in that
folder, another ".jpg" would be added!

Why can't you just create a folder named "Backup JPG Zips", & just move
them into there?

Otherwise, I guess...

REN *.zip *.jpg.zi_ << That's an underline (_)

.... would solve that problem. No file will have ".zip" in its name more
than once. And you will be able to remember what it was. For it to
function as a .zip when clicked-- you must rename it back to ".zip".
And, remember, the true extension of the file is what appears after the
FINAL dot in its name.

It would take a bit of study for me to get much fancier with batch file
coding.
http://www.computerhope.com/msdos.htm
This site looks one place for it.

| Is the changing extension back to original always safe? Just tried
| once rename(manually) vbs file to pdf, then back to vbs and get
| script file damaged, its different size.

I don't get that error from renaming .vbs to .pdf & back again. It
worked after renaming it back. While it was a .pdf, it would not work in
Acrobat Reader-- of course! Just changing the filetype won't change what
the file actually is.

Are you sure the .pdf you named back to .vbs was the right one? THAT'S
the big problem with doing this kind of thing!

| Thanks

--
Thanks or Good Luck,
There may be humor in this post, and,
Naturally, you will not sue,
Should things get worse after this,
PCR
pcrrcp@netzero.net
 
M

MEB

"SANTANDER" <santander@microsoft.news> wrote in message
news:u9IPzyQCIHA.1212@TK2MSFTNGP05.phx.gbl...
|
| "MEB" <meb@not here@hotmail.com> wrote in message
| news:uLQm$vQCIHA.1056@TK2MSFTNGP03.phx.gbl...
| > Personally, I always used either copy or xcopy to achieve the renaming
of
| > files. Though that keeps a copy of the original, adding a del line (del
| > %folder line%\*.extension, or previously properly formed variables are
| > defined, del %1%2{etc.}\*.extension) can remove those now defunct
copies.
| >
| > --
| > MEB
| > http://peoplescounsel.orgfree.com
| > ________
| >
| >
| > "SANTANDER" <santander@microsoft.news> wrote in message
| > news:eML%23hTOCIHA.4496@TK2MSFTNGP06.phx.gbl...
| > |
| > | "PCR" <pcrrcp@netzero.net> wrote in message
| > | news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
| > | > SANTANDER wrote:
| > | > | "PCR" <pcrrcp@netzero.net> wrote in message
| > | > | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
| > | > |> SANTANDER wrote:
| > | > |> | "PCR" <pcrrcp@netzero.net> wrote in message
| > | > |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
| > | > |> |> SANTANDER wrote:
| > | > |> |> | Could anyone recommend handy File Extension Changer utility,
| to
| > | > |> |> | change files extension? Renaming manually via enable 'Hide
| file
| > | > |> |> | extensions for known file types' option in 'Folder Options'
| > | > |> |> | menu is not very convenient since if then whenever we want
to
| > | > |> |> | rename a certain file, we will always have to include the
| > | > |> |> | extension for it, or else we will get a warning prompt.
| > | > |> |>
| > | > |> |> What extensions do you want to change? The warning prompt is
| > | > |> |> important because changing extensions can cause a program no
| > | > |> |> longer to function as expected when clicked.
| > | > |> |>
| > | > |> |> However, to avoid the warning, you can do it in a Windows DOS
| > | > |> |> box...
| > | > |> |>
| > | > |> |> (1) "START button, Programs, MS-DOS Prompt"
| > | > |> |> (2) REN C:\Folder\Filename.txt Filename.newext
| > | > |> |>
| > | > |> |> C:\>REN /?
| > | > |> |> Renames a file/directory or files/directories.
| > | > |> |>
| > | > |> |> RENAME [drive:][path][directoryname1 | filename1]
| [directoryname2
| > | > |> |> | filename2]
| > | > |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2
|
| > | > |> |> filename2]
| > | > |> |>
| > | > |> |> Note that you cannot specify a new drive or path for your
| > | > |> |> destination.
| > | > |> |>
| > | > |> |>
| > | > |> |> | Thanks
| > | > |> |>
| > | > |> |> --
| > | > |> |> Thanks or Good Luck,
| > | > |> |> There may be humor in this post, and,
| > | > |> |> Naturally, you will not sue,
| > | > |> |> Should things get worse after this,
| > | > |> |> PCR
| > | > |> |> pcrrcp@netzero.net
| > | > |> | --------
| > | > |> | I want change extensions of all .zip files in the current
| directory
| > | > |> | from .zip to .bak.
| > | > |> | Should I specify full path to this folder?
| > | > |> |
| > | > |> | RENAME C:\My Documents\Folder *.zip *.bak
| > | > |
| > | > |> As Zabcar said, you would need quotes around "C:\My
| > | > |> Documents\Folder", because it has a non-DOS component. To be free
| of
| > | > |> quotes, all components must be in the 8.3 DOS format--
Filename.ext
| > | > |> & containing no space or certain other special characters.
| > | > |
| > | > |> HOWEVER, that line still doesn't work, & would just rename
"Folder"
| > | > |> to be "Folder.zip". You must do as Blanton said & include a final
| > | > |> backslash...
| > | > |
| > | > |> REN "C:\My Documents\Folder\*.zip" *.bak
| > | > |
| > | > |> ...OR (because it is the current folder)...
| > | > |
| > | > |> REN *.zip *.bak
| > | > |>
| > | > | --------------------
| > | > |
| > | > | It is helpful to know DOS however, but it is extremelly
inconvenient
| > | > | to work with it nowadays.
| > | > | So I would try .BAT file which will do renaming, and will be much
| > | > | easier to work. How should look this BAT file code?
| > | >
| > | > I swore 7 years ago I WOULD learn to write complex .bat's, & that
| still
| > | > stands-- but probably Zabcar & Blanton have beaten me to it. A
simple
| > | > one is just what we've said...
| > | >
| > | > REN *.zip *.bak
| > | >
| > | > (You'd have to be in the proper folder.
| > | > Whichever is the current folder is affected.
| > | > And I'd strongly recommend...
| > | > REN *.zip *.bak.zip
| > | > ... instead!)
| > | >
| > | > --or---
| > | >
| > | > REN "C:\My Documents\Folder\*.zip" *.bak
| > | >
| > | > (You may be in any folder.
| > | > Only .zip's in "C:\My Documents\Folder" are renamed.
| > | > Again, I'd prefer to see...
| > | > REN "C:\My Documents\Folder\*.zip" *.bak.zip
| > | > ... instead!)
| > | >
| > | > Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
| > | >
| > | > | Thanks,
| > | > | S.
| > | >
| > | -----------
| > | and what if rename zip with other extension, jpg? Same thing, .jpg dot
| > zip?
| > |
| > | REN "C:\My Documents\Folder\*.zip" *.jpg.zip
| > | Is the changing extension back to original always safe? Just tried
once
| > | rename(manually) vbs file to pdf, then back to vbs and get script file
| > | damaged, its different size.
| > |
| > | Thanks
| ----------
|
| not clear. How to achieve this with bat script or vbscript? ( but not in
DOS
| box)
|
| thanks.
|

Dang, knew I shouda stayed outta dis:

You would use Windows Scripting or as you suggest VBS, but its been too
long ago for me,,, and I never wrote much in WScript. There are some sample
VBS installed in C:\WINDOWS\SAMPLES\WSH and sample scripts in
C:\WINDOWS\HELP. The scripts would work *silently* which is what you're
likely looking for.

My old DOS days bats would look something like this [using xcopy not 32]:

rename.bat:

@echo off
CD "c:\Program Files\test\"
if exist *.zip xcopy32 *.zip *.zib /v
if not exist *.zip ECHO No zip files found
del *.zip
goto VBS

:VBS
if exist *.vbs xcopy32 *.vbs *.vbb /v
if not exist *.vbs ECHO No vbs files found
del *.vbs
goto END

:END
ECHO Your files were changed to the backup *.**b format if found.

----
The bat to return them to the proper extension would be something like
this:

return.bat:

@echo off
cd "c:\Program Files\test\"
if exist *.zib if exist *.vbb goto COPY
if not exist *.zib if not exist *.vbb goto END

:COPY
xcopy32 *.zib *.zip /v
xcopy32 *.vbb *.vbs /v
del *.zib
del *.vbb
ECHO Your files were returned to their original extension and the folder
cleaned.
goto END1

:END
ECHO No files were found that needed changed


:END1


---

Of course if the Recycle Bin is on, none of the files are actually deleted,
they end up there [adding another line with del c:\recycled\*.* which gives
an error as the files aren't listed there until the DOS box closes, though
they are deleted].
Like:
ECHO Deleting files from the Recycle Bin So you know its the files there,
not somewhere else
del c:\recycled\*.*

That requires you to press y and enter.

The ECHOs are not really needed as you will see the file changes or lack
thereof in a DOS Box.
The CD would be to whatever directory you needed and including the
"drive:\folder\folder\" as others have mentioned.
The reason you do NOT want to use the .bak extension: that extension is
used within Windows and in DOS [and applications] as a default backup file
extension. Unless you remember that those files were zip files [some day
down the road when you may need them], then you would have to look at the
file with a hex editor or some other tool to look at the file header to see
what it was. Using the .**b extension at least gives a hint and makes it
easy to locate them.

As for the *variables* aspect, a good perusal of the net or an old DOS book
would be best to understand the potentials involved. Combining such things
as Errorlevel, %, >, |, SHIFT, can/could become quite complex in a supposed
simple batch file.

Sorry, I couldn't give you a script to use, perhaps someone else can.

--
MEB
http://peoplescounsel.orgfree.com
________
 
S

SANTANDER

"PCR" <pcrrcp@netzero.net> wrote in message
news:eMGAt9RCIHA.4444@TK2MSFTNGP03.phx.gbl...
> SANTANDER wrote:
> | "PCR" <pcrrcp@netzero.net> wrote in message
> | news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
> |> SANTANDER wrote:
> |> | "PCR" <pcrrcp@netzero.net> wrote in message
> |> | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
> |> |> SANTANDER wrote:
> |> |> | "PCR" <pcrrcp@netzero.net> wrote in message
> |> |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
> |> |> |> SANTANDER wrote:
> |> |> |> | Could anyone recommend handy File Extension Changer utility,
> |> |> |> | to change files extension? Renaming manually via enable
> |> |> |> | 'Hide file extensions for known file types' option in
> |> |> |> | 'Folder Options' menu is not very convenient since if then
> |> |> |> | whenever we want to rename a certain file, we will always
> |> |> |> | have to include the extension for it, or else we will get a
> |> |> |> | warning prompt.
> |> |> |>
> |> |> |> What extensions do you want to change? The warning prompt is
> |> |> |> important because changing extensions can cause a program no
> |> |> |> longer to function as expected when clicked.
> |> |> |>
> |> |> |> However, to avoid the warning, you can do it in a Windows DOS
> |> |> |> box...
> |> |> |>
> |> |> |> (1) "START button, Programs, MS-DOS Prompt"
> |> |> |> (2) REN C:\Folder\Filename.txt Filename.newext
> |> |> |>
> |> |> |> C:\>REN /?
> |> |> |> Renames a file/directory or files/directories.
> |> |> |>
> |> |> |> RENAME [drive:][path][directoryname1 | filename1]
> |> |> |> [directoryname2
> |> |> |> | filename2]
> |> |> |> REN [drive:][path][directoryname1 | filename1] [directoryname2
> |> |> |> | filename2]
> |> |> |>
> |> |> |> Note that you cannot specify a new drive or path for your
> |> |> |> destination.
> |> |> |>
> |> |> |>
> |> |> |> | Thanks
> |> |> |>
> |> |> |> --
> |> |> |> Thanks or Good Luck,
> |> |> |> There may be humor in this post, and,
> |> |> |> Naturally, you will not sue,
> |> |> |> Should things get worse after this,
> |> |> |> PCR
> |> |> |> pcrrcp@netzero.net
> |> |> | --------
> |> |> | I want change extensions of all .zip files in the current
> |> |> | directory from .zip to .bak.
> |> |> | Should I specify full path to this folder?
> |> |> |
> |> |> | RENAME C:\My Documents\Folder *.zip *.bak
> |> |
> |> |> As Zabcar said, you would need quotes around "C:\My
> |> |> Documents\Folder", because it has a non-DOS component. To be free
> |> |> of quotes, all components must be in the 8.3 DOS format--
> |> |> Filename.ext & containing no space or certain other special
> |> |> characters.
> |> |
> |> |> HOWEVER, that line still doesn't work, & would just rename
> |> |> "Folder" to be "Folder.zip". You must do as Blanton said &
> |> |> include a final backslash...
> |> |
> |> |> REN "C:\My Documents\Folder\*.zip" *.bak
> |> |
> |> |> ...OR (because it is the current folder)...
> |> |
> |> |> REN *.zip *.bak
> |> |>
> |> | --------------------
> |> |
> |> | It is helpful to know DOS however, but it is extremelly
> |> | inconvenient to work with it nowadays.
> |> | So I would try .BAT file which will do renaming, and will be much
> |> | easier to work. How should look this BAT file code?
> |>
> |> I swore 7 years ago I WOULD learn to write complex .bat's, & that
> |> still stands-- but probably Zabcar & Blanton have beaten me to it. A
> |> simple one is just what we've said...
> |>
> |> REN *.zip *.bak
> |>
> |> (You'd have to be in the proper folder.
> |> Whichever is the current folder is affected.
> |> And I'd strongly recommend...
> |> REN *.zip *.bak.zip
> |> ... instead!)
> |>
> |> --or---
> |>
> |> REN "C:\My Documents\Folder\*.zip" *.bak
> |>
> |> (You may be in any folder.
> |> Only .zip's in "C:\My Documents\Folder" are renamed.
> |> Again, I'd prefer to see...
> |> REN "C:\My Documents\Folder\*.zip" *.bak.zip
> |> ... instead!)
> |>
> |> Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
> |>
> |> | Thanks,
> |> | S.
> |>
> | -----------
> | and what if rename zip with other extension, jpg? Same thing, .jpg
> | dot zip?


> I still want to know why you are doing these things? Why can't you just
> create a folder named "Backup Zips", & just copy your .zip's into
> there-- w/o renaming them?


> | REN "C:\My Documents\Folder\*.zip" *.jpg.zip


> Actually -- on 2nd thought -- this isn't a great idea, if you are
> intending to REN the files in a folder more than once. "Filename.zip"
> would become "Filename.jpg.zip" the 1st time. Next time, it would become
> ""Filename.jpg.jpg.zip"-- & so on! Each time you do the REN in that
> folder, another ".jpg" would be added!


> Why can't you just create a folder named "Backup JPG Zips", & just move
> them into there?


> Otherwise, I guess...
>
> REN *.zip *.jpg.zi_ << That's an underline (_)


> ... would solve that problem. No file will have ".zip" in its name more
> than once. And you will be able to remember what it was. For it to
> function as a .zip when clicked-- you must rename it back to ".zip".
> And, remember, the true extension of the file is what appears after the
> FINAL dot in its name.


> It would take a bit of study for me to get much fancier with batch file
> coding.
> http://www.computerhope.com/msdos.htm
> This site looks one place for it.


> | Is the changing extension back to original always safe? Just tried
> | once rename(manually) vbs file to pdf, then back to vbs and get
> | script file damaged, its different size.
>
> I don't get that error from renaming .vbs to .pdf & back again. It
> worked after renaming it back. While it was a .pdf, it would not work in
> Acrobat Reader-- of course! Just changing the filetype won't change what
> the file actually is.


> Are you sure the .pdf you named back to .vbs was the right one? THAT'S
> the big problem with doing this kind of thing!


> | Thanks
>

-------------

I want to rename extension just because I need upload on webserver some
files types, that server does not support (strange rules), like zip, scripts
etc
So I need just rename extension to something common like .jpg, .png, .pdf,
etc. After downloading them, it will be renamed back.
However, various file renamer utilities can do this better.

Thanks.
Santander
 
P

PCR

"SANTANDER" <santander@microsoft.news> wrote in message
news:ur6ZS1dCIHA.4444@TK2MSFTNGP03.phx.gbl...
|
| "PCR" <pcrrcp@netzero.net> wrote in message
| news:eMGAt9RCIHA.4444@TK2MSFTNGP03.phx.gbl...
| > SANTANDER wrote:
| > | "PCR" <pcrrcp@netzero.net> wrote in message
| > | news:eQ4p4zGCIHA.1408@TK2MSFTNGP05.phx.gbl...
| > |> SANTANDER wrote:
| > |> | "PCR" <pcrrcp@netzero.net> wrote in message
| > |> | news:%23H9oZkFCIHA.5228@TK2MSFTNGP05.phx.gbl...
| > |> |> SANTANDER wrote:
| > |> |> | "PCR" <pcrrcp@netzero.net> wrote in message
| > |> |> | news:OYM0Wt5BIHA.912@TK2MSFTNGP05.phx.gbl...
| > |> |> |> SANTANDER wrote:
| > |> |> |> | Could anyone recommend handy File Extension Changer
utility,
| > |> |> |> | to change files extension? Renaming manually via enable
| > |> |> |> | 'Hide file extensions for known file types' option in
| > |> |> |> | 'Folder Options' menu is not very convenient since if
then
| > |> |> |> | whenever we want to rename a certain file, we will always
| > |> |> |> | have to include the extension for it, or else we will get
a
| > |> |> |> | warning prompt.
| > |> |> |>
| > |> |> |> What extensions do you want to change? The warning prompt
is
| > |> |> |> important because changing extensions can cause a program
no
| > |> |> |> longer to function as expected when clicked.
| > |> |> |>
| > |> |> |> However, to avoid the warning, you can do it in a Windows
DOS
| > |> |> |> box...
| > |> |> |>
| > |> |> |> (1) "START button, Programs, MS-DOS Prompt"
| > |> |> |> (2) REN C:\Folder\Filename.txt Filename.newext
| > |> |> |>
| > |> |> |> C:\>REN /?
| > |> |> |> Renames a file/directory or files/directories.
| > |> |> |>
| > |> |> |> RENAME [drive:][path][directoryname1 | filename1]
| > |> |> |> [directoryname2
| > |> |> |> | filename2]
| > |> |> |> REN [drive:][path][directoryname1 | filename1]
[directoryname2
| > |> |> |> | filename2]
| > |> |> |>
| > |> |> |> Note that you cannot specify a new drive or path for your
| > |> |> |> destination.
| > |> |> |>
| > |> |> |>
| > |> |> |> | Thanks
| > |> |> |>
| > |> |> |> --
| > |> |> |> Thanks or Good Luck,
| > |> |> |> There may be humor in this post, and,
| > |> |> |> Naturally, you will not sue,
| > |> |> |> Should things get worse after this,
| > |> |> |> PCR
| > |> |> |> pcrrcp@netzero.net
| > |> |> | --------
| > |> |> | I want change extensions of all .zip files in the current
| > |> |> | directory from .zip to .bak.
| > |> |> | Should I specify full path to this folder?
| > |> |> |
| > |> |> | RENAME C:\My Documents\Folder *.zip *.bak
| > |> |
| > |> |> As Zabcar said, you would need quotes around "C:\My
| > |> |> Documents\Folder", because it has a non-DOS component. To be
free
| > |> |> of quotes, all components must be in the 8.3 DOS format--
| > |> |> Filename.ext & containing no space or certain other special
| > |> |> characters.
| > |> |
| > |> |> HOWEVER, that line still doesn't work, & would just rename
| > |> |> "Folder" to be "Folder.zip". You must do as Blanton said &
| > |> |> include a final backslash...
| > |> |
| > |> |> REN "C:\My Documents\Folder\*.zip" *.bak
| > |> |
| > |> |> ...OR (because it is the current folder)...
| > |> |
| > |> |> REN *.zip *.bak
| > |> |>
| > |> | --------------------
| > |> |
| > |> | It is helpful to know DOS however, but it is extremelly
| > |> | inconvenient to work with it nowadays.
| > |> | So I would try .BAT file which will do renaming, and will be
much
| > |> | easier to work. How should look this BAT file code?
| > |>
| > |> I swore 7 years ago I WOULD learn to write complex .bat's, & that
| > |> still stands-- but probably Zabcar & Blanton have beaten me to
it. A
| > |> simple one is just what we've said...
| > |>
| > |> REN *.zip *.bak
| > |>
| > |> (You'd have to be in the proper folder.
| > |> Whichever is the current folder is affected.
| > |> And I'd strongly recommend...
| > |> REN *.zip *.bak.zip
| > |> ... instead!)
| > |>
| > |> --or---
| > |>
| > |> REN "C:\My Documents\Folder\*.zip" *.bak
| > |>
| > |> (You may be in any folder.
| > |> Only .zip's in "C:\My Documents\Folder" are renamed.
| > |> Again, I'd prefer to see...
| > |> REN "C:\My Documents\Folder\*.zip" *.bak.zip
| > |> ... instead!)
| > |>
| > |> Name the .bat... "RenZip.bat"... & type it at the DOS box prompt.
| > |>
| > |> | Thanks,
| > |> | S.
| > |>
| > | -----------
| > | and what if rename zip with other extension, jpg? Same thing, .jpg
| > | dot zip?
|
| > I still want to know why you are doing these things? Why can't you
just
| > create a folder named "Backup Zips", & just copy your .zip's into
| > there-- w/o renaming them?
|
| > | REN "C:\My Documents\Folder\*.zip" *.jpg.zip
|
| > Actually -- on 2nd thought -- this isn't a great idea, if you are
| > intending to REN the files in a folder more than once.
"Filename.zip"
| > would become "Filename.jpg.zip" the 1st time. Next time, it would
become
| > ""Filename.jpg.jpg.zip"-- & so on! Each time you do the REN in that
| > folder, another ".jpg" would be added!
|
| > Why can't you just create a folder named "Backup JPG Zips", & just
move
| > them into there?
|
| > Otherwise, I guess...
| >
| > REN *.zip *.jpg.zi_ << That's an underline (_)
|
| > ... would solve that problem. No file will have ".zip" in its name
more
| > than once. And you will be able to remember what it was. For it to
| > function as a .zip when clicked-- you must rename it back to ".zip".
| > And, remember, the true extension of the file is what appears after
the
| > FINAL dot in its name.
|
| > It would take a bit of study for me to get much fancier with batch
file
| > coding.
| > http://www.computerhope.com/msdos.htm
| > This site looks one place for it.
|
| > | Is the changing extension back to original always safe? Just tried
| > | once rename(manually) vbs file to pdf, then back to vbs and get
| > | script file damaged, its different size.
| >
| > I don't get that error from renaming .vbs to .pdf & back again. It
| > worked after renaming it back. While it was a .pdf, it would not
work in
| > Acrobat Reader-- of course! Just changing the filetype won't change
what
| > the file actually is.
|
| > Are you sure the .pdf you named back to .vbs was the right one?
THAT'S
| > the big problem with doing this kind of thing!
|
| > | Thanks
| >
| -------------
|
| I want to rename extension just because I need upload on webserver
some
| files types, that server does not support (strange rules), like zip,
scripts
| etc
| So I need just rename extension to something common like .jpg, .png,
..pdf,
| etc. After downloading them, it will be renamed back.
| However, various file renamer utilities can do this better.

I see. That's inconvenient & especially strange a .zip is not allowed. I
guess you do have a legit reason for doing these things, then. Very
inconvenient!

I guess I would zip them with WinZip, & rename the .zip to
"Filename.zi_", before uploading it. Whoever then downloads it, will
need to rename it to "Filename.zip". After unzipping it, he will be able
to see what is inside-- .vbs, .pdf, whatever so, I wouldn't put that in
its name. You also must rename it back to .zip, if you want to use it
again.

Probably, I would suffer through the Explorer requestor or do the
renaming in DOS. If I wrote a .bat or .vbs to do the renaming-- I would
want it to do the upload too! (But I don't know how to write that,
sorry.) Good luck.

| Thanks.
| Santander
|
 

Similar threads

C
Replies
0
Views
75
Craig Loewen
C
A
Replies
0
Views
27
Amanda Langowski
A
A
Replies
0
Views
32
Amanda Langowski
A
A
Replies
0
Views
40
Amanda Langowski
A
A
Replies
0
Views
53
Amanda Langowski
A
Back
Top Bottom