A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

STUPID%20FILE%20NAMES



 
 
Thread Tools Display Modes
  #1  
Old June 11th 14, 10:34 AM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 591
Default STUPID%20FILE%20NAMES

I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....

So, rather than save time, I now have 400 files to rename, one by
one....

Just for the heck of it, I googled for "Bulk file remaner". I did
download one program called "Bulk Rename Utility". I wasted an hour
trying to understand the program, and deleted it. It makes no sense at
all. That seems to be all that is available for this sort of use.
All the time I wasted trying to understand that program, I could have
manually renamed half the files.
Ads
  #2  
Old June 11th 14, 01:29 PM posted to microsoft.public.windowsxp.general
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default STUPID%20FILE%20NAMES

On 6/11/14 3:34 AM, wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....


The %20 is the hexadecimal representation of a space. For a web
address, you cannot have spaces in a file name you want to link to so it
either displays or automatically starts the download process.

"One of the most common special characters is the space. You can't type
a space in a URL directly. A space position in the character set is 20
hexadecimal. So you can use %20 in place a space when passing your
request to the server.

"http://www.example.com/new%20pricing.html

"This URL actually retrieves a document named new pricing.html from the
www.example.com"


http://www.tutorialspoint.com/html/h...l_encoding.htm

That's the best I can offer without knowing the URL you started from.

snip


--
Ken
Mac OS X 10.8.5
Firefox 25.0
Thunderbird 24.3.0
"My brain is like lightning, a quick flash
and it's gone!"
  #3  
Old June 11th 14, 01:52 PM posted to microsoft.public.windowsxp.general
Mayayana
external usenet poster
 
Posts: 6,438
Default STUPID%20FILE%20NAMES

Spaces are not valid in URLs, so the space gets
replaced with the hex ANSI code for a space.
(H20 or decimal 32)

I'd suggest you look into VBScript and the Windows
Script Host. I use it regularly for jobs like this and
keep more than a dozen scripts on the Desktop.

Here's a sample. If you copy the text below into
Notepad and save it with .vbs extension, you can drop
a folder onto it. The script will ask you what text to
replace in file names, then it will ask you what to
replace it with. (For instance, you can enter %20 in
the first box and type a space in the second. To remove
text, leave the second box blank.)

The script will then process all files in all subfolders,
down one level, plus all files in the dropped folder. (It can
be made recursive, but this version is probably adequate
for most uses.) If you're nervous about doing this, copy
the parent folder first and process that.

' Watch out for wordwrap when you copy this.
'---------- begin vbscript---------------

Dim FSO, Arg, oFol, oFol2, oFols, oFil, oFils, s1, sRep, sRepWith

Set FSO = CreateObject("Scripting.FileSystemObject")
Arg = WScript.Arguments(0)

If Len(Arg) = 0 Then
MsgBox "Drop a folder onto this script.", 64
DropIt
End If

sRep = InputBox("Enter text to replace in file names.", "File Renaming",
"%20")
If Len(sRep) = 0 Then DropIt

sRepWith = InputBox("Enter replacement text.", "File Renaming", "")
If Len(sRepWith) = 0 Then sRepWith = ""

On Error Resume Next

Set oFol = FSO.GetFolder(Arg)
Set oFols = oFol.SubFolders
For Each oFol2 in oFols
Set oFils = oFol2.files
For Each oFil in oFils
s1 = oFil.name
s1 = Replace(s1, sRep, sRepWith)
oFil.name = s1
Next
Set oFils = Nothing
Next
Set oFols = Nothing
Set oFils = oFol.files
For Each oFil in oFils
s1 = oFil.name
s1 = Replace(s1, sRep, sRepWith)
oFil.name = s1
Next
Set oFils = Nothing
Set oFol = Nothing

DropIt

Sub DropIt()
MsgBox "Done."
Set FSO = Nothing
WScript.Quit
End Sub

'------------ end vbscript ------------------------------


wrote in message
...
|I saved a bunch of animated Gifs from a website. About 400 of them.
| Rather than save them one by one, I just saved the entire webpage which
| had about 10 to 15 per page. Then I just went to the saved page,
| deleted the .htm file and the other junk, such as the scripts and
| headers. What remained were just the .GIF files.
|
| I thought this would save time, but I soon found out different. Instead
| of saving the file by it's name
|
| (EXample):
|
| ANIMATED GIFS DOG 01.GIF
|
| I got this:
|
| ANIMATED%20GIFS%20DOG%2001.GIF
|
| Why does it do this? It fills in all the blanks with %20, which seems
| really senseless and is annoying as hell.
| This is not the first time I've had this happen....
|
| So, rather than save time, I now have 400 files to rename, one by
| one....
|
| Just for the heck of it, I googled for "Bulk file remaner". I did
| download one program called "Bulk Rename Utility". I wasted an hour
| trying to understand the program, and deleted it. It makes no sense at
| all. That seems to be all that is available for this sort of use.
| All the time I wasted trying to understand that program, I could have
| manually renamed half the files.


  #4  
Old June 11th 14, 01:57 PM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default STUPID%20FILE%20NAMES

wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....

So, rather than save time, I now have 400 files to rename, one by
one....

Just for the heck of it, I googled for "Bulk file remaner". I did
download one program called "Bulk Rename Utility". I wasted an hour
trying to understand the program, and deleted it. It makes no sense at
all. That seems to be all that is available for this sort of use.
All the time I wasted trying to understand that program, I could have
manually renamed half the files.


http://en.wikipedia.org/wiki/File_URI_scheme

"Characters such as the hash (#) or question mark (?) which are
part of the filename should be "percent-encoded".
"

http://en.wikipedia.org/wiki/Percent-encoding

If you were a programmer, there is a great site for
comparing techniques. In this example, they practice
removing %20. They're not doing file renaming
though, which would mean adding a few more
lines of code.

http://rosettacode.org/wiki/URL_decoding

Here, some people propose DOS-like scripts
for the job. I suspect this code is removing
one %20 at a time.

http://www.computing.net/answers/pro...mes/13957.html

I would do it in some other language. And the
job would likely take me all day to get right :-)
Maybe I'd crack my PERL book and do it there.
I think I have ActiveState PERL on the box here
somewhere... It's a freebie. It would probably
take around ten lines, tops... if I could
figure it out :-)

Paul
  #5  
Old June 11th 14, 02:04 PM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 591
Default STUPID%20FILE%20NAMES

On Wed, 11 Jun 2014 06:29:56 -0600, Ken Springer
wrote:

On 6/11/14 3:34 AM, wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....


The %20 is the hexadecimal representation of a space. For a web
address, you cannot have spaces in a file name you want to link to so it
either displays or automatically starts the download process.

"One of the most common special characters is the space. You can't type
a space in a URL directly. A space position in the character set is 20
hexadecimal. So you can use %20 in place a space when passing your
request to the server.

"http://www.example.com/new%20pricing.html

"This URL actually retrieves a document named new pricing.html from the
www.example.com"


http://www.tutorialspoint.com/html/h...l_encoding.htm

That's the best I can offer without knowing the URL you started from.

snip


Ok, that makes sense. If I had clicked "SAVE AS" for each file, it
would have saved them with the actual spaces. So instead of doing all
of that, now I have to rename them all. Either way, it's a pain, but I
just rename a few at a time. I could just leave them too, but I hate
names like that.

  #6  
Old June 11th 14, 02:13 PM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 591
Default STUPID%20FILE%20NAMES

On Wed, 11 Jun 2014 08:57:21 -0400, Paul wrote:


Just for the heck of it, I googled for "Bulk file remaner". I did
download one program called "Bulk Rename Utility". I wasted an hour
trying to understand the program, and deleted it. It makes no sense at
all. That seems to be all that is available for this sort of use.
All the time I wasted trying to understand that program, I could have
manually renamed half the files.


http://en.wikipedia.org/wiki/File_URI_scheme

"Characters such as the hash (#) or question mark (?) which are
part of the filename should be "percent-encoded".
"

http://en.wikipedia.org/wiki/Percent-encoding

If you were a programmer, there is a great site for
comparing techniques. In this example, they practice
removing %20. They're not doing file renaming
though, which would mean adding a few more
lines of code.

http://rosettacode.org/wiki/URL_decoding

Here, some people propose DOS-like scripts
for the job. I suspect this code is removing
one %20 at a time.

http://www.computing.net/answers/pro...mes/13957.html

I would do it in some other language. And the
job would likely take me all day to get right :-)
Maybe I'd crack my PERL book and do it there.
I think I have ActiveState PERL on the box here
somewhere... It's a freebie. It would probably
take around ten lines, tops... if I could
figure it out :-)

Paul


If it takes all day, I can manually rename them much faster. This is a
one shot deal, so no sense getting all involved. But I will try that
script from mayayana and see if I can do it.
I have had to rename multiple files in the past, but never this many.
But even if I did them all at once (manually) I could do it in 2 hours
tops. I already did about 100 of them. But that script looks like a
challenge. I'll already made a copy in case I screw up. I just
winzipped the whole folder.



  #8  
Old June 11th 14, 04:23 PM posted to microsoft.public.windowsxp.general
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default STUPID%20FILE%20NAMES

On 6/11/14 7:04 AM, wrote:
On Wed, 11 Jun 2014 06:29:56 -0600, Ken Springer
wrote:

On 6/11/14 3:34 AM,
wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....


The %20 is the hexadecimal representation of a space. For a web
address, you cannot have spaces in a file name you want to link to so it
either displays or automatically starts the download process.

"One of the most common special characters is the space. You can't type
a space in a URL directly. A space position in the character set is 20
hexadecimal. So you can use %20 in place a space when passing your
request to the server.

"http://www.example.com/new%20pricing.html

"This URL actually retrieves a document named new pricing.html from the
www.example.com"


http://www.tutorialspoint.com/html/h...l_encoding.htm

That's the best I can offer without knowing the URL you started from.

snip


Ok, that makes sense. If I had clicked "SAVE AS" for each file, it
would have saved them with the actual spaces. So instead of doing all
of that, now I have to rename them all. Either way, it's a pain, but I
just rename a few at a time. I could just leave them too, but I hate
names like that.


Would it be quicker to delete all of them and then download again using
Save As?


--
Ken
Mac OS X 10.8.5
Firefox 25.0
Thunderbird 24.3.0
"My brain is like lightning, a quick flash
and it's gone!"
  #9  
Old June 11th 14, 04:37 PM posted to microsoft.public.windowsxp.general
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default STUPID%20FILE%20NAMES

On 6/11/14 9:23 AM, Ken Springer wrote:
On 6/11/14 7:04 AM, wrote:
On Wed, 11 Jun 2014 06:29:56 -0600, Ken Springer
wrote:

On 6/11/14 3:34 AM,
wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....

The %20 is the hexadecimal representation of a space. For a web
address, you cannot have spaces in a file name you want to link to so it
either displays or automatically starts the download process.

"One of the most common special characters is the space. You can't type
a space in a URL directly. A space position in the character set is 20
hexadecimal. So you can use %20 in place a space when passing your
request to the server.

"http://www.example.com/new%20pricing.html

"This URL actually retrieves a document named new pricing.html from the
www.example.com"


http://www.tutorialspoint.com/html/h...l_encoding.htm

That's the best I can offer without knowing the URL you started from.

snip


Ok, that makes sense. If I had clicked "SAVE AS" for each file, it
would have saved them with the actual spaces. So instead of doing all
of that, now I have to rename them all. Either way, it's a pain, but I
just rename a few at a time. I could just leave them too, but I hate
names like that.


Would it be quicker to delete all of them and then download again using
Save As?


Hmmmmm, I wonder if you could use the Rename command and wildcards in
the Command Prompt window and make it work?


--
Ken
Mac OS X 10.8.5
Firefox 25.0
Thunderbird 24.3.0
"My brain is like lightning, a quick flash
and it's gone!"
  #10  
Old June 11th 14, 04:42 PM posted to microsoft.public.windowsxp.general
Davidm
external usenet poster
 
Posts: 106
Default STUPID%20FILE%20NAMES

On Wed, 11 Jun 2014 05:34:13 -0400, wrote:

I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....

So, rather than save time, I now have 400 files to rename, one by
one....

Just for the heck of it, I googled for "Bulk file remaner". I did
download one program called "Bulk Rename Utility". I wasted an hour
trying to understand the program, and deleted it. It makes no sense at
all. That seems to be all that is available for this sort of use.
All the time I wasted trying to understand that program, I could have
manually renamed half the files.

I've got a VERY simple bulk file renamer (freeware) that will do what
you want, I've been using it for years. Works ok on 98, XP and W7 (32
and 64), not tried on anything else.

You can just replace part or all of the filename with your own text,
including an incremental number, and preview the result before
applying the change.

Unfortunately it's obsolete and I cant find any download source to
refer you to. It's called "Rename-it" but the things that google find
are more recent, and much more complex.

I've got it in a 106Kb zip file, which I'd be happy to email to you,
or put in my OneDrive (SkyDrive) for you.

(remove the -notme to email me)
  #11  
Old June 11th 14, 06:46 PM posted to microsoft.public.windowsxp.general
Bill in Co
external usenet poster
 
Posts: 1,927
Default STUPID%20FILE%20NAMES

wrote:
I saved a bunch of animated Gifs from a website. About 400 of them.
Rather than save them one by one, I just saved the entire webpage which
had about 10 to 15 per page. Then I just went to the saved page,
deleted the .htm file and the other junk, such as the scripts and
headers. What remained were just the .GIF files.

I thought this would save time, but I soon found out different. Instead
of saving the file by it's name

(EXample):

ANIMATED GIFS DOG 01.GIF

I got this:

ANIMATED%20GIFS%20DOG%2001.GIF

Why does it do this? It fills in all the blanks with %20, which seems
really senseless and is annoying as hell.
This is not the first time I've had this happen....

So, rather than save time, I now have 400 files to rename, one by
one....

Just for the heck of it, I googled for "Bulk file remaner". I did
download one program called "Bulk Rename Utility". I wasted an hour
trying to understand the program, and deleted it. It makes no sense at
all. That seems to be all that is available for this sort of use.
All the time I wasted trying to understand that program, I could have
manually renamed half the files.


My favorite simple file renamer is called "Renamer", by den4b. The Lite
version is free. I haven't tried the newer version(s), as I'm still using a
very old version, but it just might work for you!.

http://www.den4b.com/



  #12  
Old June 11th 14, 07:01 PM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 591
Default STUPID%20FILE%20NAMES

On Wed, 11 Jun 2014 09:23:00 -0600, Ken Springer
wrote:


Would it be quicker to delete all of them and then download again using
Save As?


I thought about that, but not on dialup.
I can manually rename them faster.

  #14  
Old June 11th 14, 09:00 PM posted to microsoft.public.windowsxp.general
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default STUPID%20FILE%20NAMES

In message , Ken Springer
writes:
[]
Hmmmmm, I wonder if you could use the Rename command and wildcards in
the Command Prompt window and make it work?


possibly in a for ... in ... structure?
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

Try to learn something about everything and everything about something.
-Thomas Henry Huxley, biologist (1825-1895)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.