• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

pdf file name replace

bharath

Member
Hi,

Is it possible to pdf file name replacing
ex: P BHARATH_ABCDE123FDS_TDS
CHANGE IN TO " P BHARATH_ABCDE123FDS_AP01234_TDS (IN PDF FORMAT ONLY)
NOTE: HERE I HAVE A EXCEL DATA LIKE
A1 CELL B1 CELL
ABCDE123FDS AP01234
ASDFF123SDF AP01235
IF POSSIBLE PLEASE HELP ME
LIKE ABOVE 8000 RECORDS ARE THERE
 
Hi Bharath,

Let me understand this correctly your PDF name will be like "P BHARATH_ABCDE123FDS_TDS.PDF" and you want rename using the excel data, like if cells A1 value matchs with the bold part of the actual name then just need to add cell B1 value into the PDF name like "P BHARATH_ABCDE123FDS_AP01234_TDS.PDF".

Regards
Abdul Matheen
 
Hi, bharath!

Your explanation of the issue isn't clear enough. My doubts:
a) In column A you have a list of values that are the names of .PDF files at some location.
b) In column B you want a formula to retrieve the new value for the filename.
c) How do are you going to rename them? On a line by line basis, all together?
d) What if a source (column A) filename doesn't exist?
e) What if a target (column B) filename yet exists?

Consider uploading (a) sample file(s) (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you.

Regards!
 
Hi,

I will try to explain my level best

Pdf files are in folder only like

P.bharath_abcdf1234f_tds.pdf

I want to change the part is "abcdf1234f" this is pan number to be changed into "abcdf1234f_ap01234" here "ap01234" is our customer code

But all above said work should be in folder only and pdf format only.


Note: here i have only the codes and pan numbers in excel file

They are in column a = pan numbers (like 'abcdf1234f')

And in column b =codes of customers (like 'ap01234')

" with excel file pan numbers look up values (codes) should be replaced as "pan number_code" in other folder as in pdf format only


Here my requirement will be in folder only but by using excel pan numbers look up values means codes pdf file name should be replaced as above said
 
Last edited by a moderator:
hi,

i have one doubt

that is " can we change pdf file names with vba macros"

and one more is " by using excel data can we rename the file name in same format like pdf and image formats or video formats etc...."

actually why am i asking you know

i used to take prints and after that i used to separate by finding pan numbers

but now i want to make it easy by renaming i can separate according their belonging codes before print only


so.. please help me and i think, it will be so useful ours
 
Last edited by a moderator:
Hi, bharath!

Do you happen to guess where should I have found this?
"Please Don't

PLEASE DON'T SHOUT! We have big ears and will hear you just the same."
(quoted).

If not perhaps you'd want to read the sticky posts at this forums main page so as to know the guidelines that will lead to know how this community operates (introducing yourself, posting files, netiquette rules, and so on).
http://chandoo.org/forum/forums/new-users-please-start-here.14/

Regards!
 
Hi Bharath ,

It may be possible , but your explanation is not clear ; if you can upload a sample file , with the confidential data replaced by dummy data , it will make things easier.

Narayan
 
Hi Bharath ,

Please confirm that my understanding of your requirement is correct.

1. You have an Excel worksheet which has two columns of data ; the first column lists several PAN numbers , and the second column lists the corresponding codes.

2. Given a specific folder name , we need to retrieve the file names from the folder one by one ; for each file , we extract the left-most 10 characters of the file name , match that with the list of PAN numbers , retrieve the corresponding code , and insert this code within the file name.

I assume that all PAN numbers from the file names will have a match ; in case there is no match , nothing will be done to the file name.

Narayan
 
Hi Bharath ,

See if this is OK. Try it out with some sample files in a test folder before you run it on your working folder.

Narayan
 

Attachments

  • pdf file name replace.xlsm
    93 KB · Views: 17
Hi, I know this is an old post but I have a problem with a part of the code.
I just wanted to use the name piece of the code, when i use name oldname as newname I recieve error 5: Invalid procedure call or argument how do i fix this?
If I use as path my computer no problem but when I use the sharepoint server he gives this problem. Can someone help me??
 

Attachments

  • pdf file name replace.xlsm
    98.8 KB · Views: 1
  • pdf file name replace.xlsm
    98.8 KB · Views: 2
Back
Top