advertisement
Forums

The Forum is sponsored by 
 

AAPL stock: Click Here

You are currently viewing the Tips and Deals forum
Getting rid of %20 and replacing it with a space
Posted by: freeradical
Date: January 27, 2014 01:53AM
I have a bunch of pdf's with %20's in the filenames instead of spaces. What's the easiest way to replace a %20 with a space. I'm not interested in finding and replacing any characters in the files themselves, only the filenames.

I'd guess that maybe this could easily be done in the terminal?
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: eustacetilley
Date: January 27, 2014 02:35AM
Yes, the Terminal and grep are your friends.

But the bigger problem is why you have so many %20s to begin with. Just how is it that you are saving these PDFs in such a manner that this becomes an annoyance?

Eustace
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: WHiiP
Date: January 27, 2014 04:22AM
From an Apple Support Forum:


I have an Adobe file that contains hyper links to .pdfs on a website. When the link is selected the file name.pdf%20 is referenced and is
not found--because of the %20 being automatically appended to the file name. This is not happening on other computers.


Sincerely,
Gary
iPad 2, iOS 4.3.3, The hyperlinks work on other computer



This solved my question by GGary on Jan 26, 2012 9:04 PM
GGary
I went into debugging mode and solved the problem which was, in reality, a series of multiple problems.
First, I have all the links on a web page that I copied and pasted into an MS Word (.doc) document. This document
when downloaded as an attachment from my aol e-mail (using the Safari browser), had links that contined "%20t%20_blank" which indicated to me that I should not use <a href="filename.pdf" target="_blank">.

So, when I used only <a href="filename.pdf"> and pasted the web contents into the MS Word file, and attached this .doc file, everything worked fine. If, however, I converted this MS Word file to ADOBE, then the filename.pdf%20 references appeared again.

Thus, the solution seemed to be to attach the .doc file to my aol email (and not use the target parameter in the hyperlink).

Sincerely,
Gary S. Goldman, Ph.D.
Computer Scientist



Bill
Flagler Beach, FL 32136

Carpe Vino!

Fermentation may have been a greater discovery than fire.
— David Rains Wallace
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: Bixby
Date: January 27, 2014 06:06AM
Automator.
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: Mr645
Date: January 27, 2014 06:26AM
I have used automator to change the %20 to an underscore. The space causes a problem if you try to upload the file to a website. The underscore is safe for web and even Windows use
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: decay
Date: January 27, 2014 07:47AM
R-Name
[www.macupdate.com]



---
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: ka jowct
Date: January 27, 2014 07:53AM
NameMangler
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: OWC Jamie
Date: January 27, 2014 08:21AM
Name Munger [www.macupdate.com]



Good Luck!
Jamie Dresser
Other World Computing
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: mikebw
Date: January 27, 2014 08:57AM
Quote
Bixby
Automator.

I would also just use Automator.
Options:  Reply • Quote
Re: Getting rid of %20 and replacing it with a space
Posted by: freeradical
Date: January 27, 2014 09:40AM
Okay, I found something that works, and is free.

I have an Applescript in my "Finder Scripts" that does the job. It's the "Replace Text in Item Names" script.

I just have to put all the files in a folder, and make sure that folder is the active one. It first asks what text I want to replace, and then it prompts me for what to replace it with. As a replacement text, I simply hit the spacebar.

Now I discover that there are some %26s in my filenames...:-)
Options:  Reply • Quote
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 186 on February 20, 2020
Record Number of Guests: 5122 on October 03, 2020