Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Update PDF names in Windows Explorer

Posted on 2015-02-12
9
Medium Priority
?
168 Views
Last Modified: 2015-02-12
I have some PDF drawings i need to rename Problem is some of the pdf names include the "&" symbol. This is a reserved word in ESRI and the attachments are not working.

 I would just like to Delete that from the name all together.
 So Plan&Profile becomes PlanProfile or Plan_Profile
 I can replace with and "_" as well. Either way is good with me.

I have not done any programming like this. I'm thinking it would be a process to select all the names in the folder check to see if "&" in the name then delete or replace that piece of TExt. then move on to the next one.

 I'm hoping to get some feedback on the best way to do this.
 Thanks
0
Comment
Question by:PtboGiser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 40605703
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40605712
You can't have the character '&' in filenames.
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 2000 total points
ID: 40605714
Try using Advanced Renamer - www.advancedrenamer.com

It allows you to remove a pattern from the filename.
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
LVL 18

Expert Comment

by:Simon
ID: 40605718
You can rename files using the FileSystemObject with a vbscript.

This link shows a reasonable example, though you'd probably want to use the replace() function rather than truncating the filename.
0
 
LVL 3

Expert Comment

by:Onisan
ID: 40605786
Save the attached file to your desktop,
Open it with Notepad and
change the path to your folder from C:\Onisan   (my test folder path)

Then close and double click

Done.
rename.vbs
0
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 40605958
You've had several good suggestions on how to do this and I'm not going to add more ways. But I do want to comment on the post that says, "You can't have the character '&' in filenames." That is incorrect! The ampersand is a valid character for file names. For the record, the following characters are not allowed in Windows file names:

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
Integer value zero (ASCII NUL character)
Integer values 1-31 (except for alternate data streams, where these characters are allowed)

Regards, Joe
0
 

Author Closing Comment

by:PtboGiser
ID: 40605968
This is a real nice easy tool.
Thanks worked perfectly.
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40605995
@Joe:
That's the problem to work more with Command Prompt than Windows GUI.
The only way you can create a file with '&' in the name using Command Prompt is to put the names inside quotes. For example: "ABC&D.txt". Using Windows GUI or a Save File As... option I've realized that you can use the '&' without any problem.
0
 
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 40606024
> The only way you can create a file with '&' in the name using Command Prompt is to put the names inside quotes.

Also true for a space. But the point is, ampersand is a perfectly valid character in a file name (as is a space).
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question