1
Coding Snacks / Open files and rename or save as with new file name
« on: January 30, 2009, 06:49 AM »
I have a lot of PDF files called file001/002….. (100’s of files), all 1 page documents.
Is it possible for some code that would open selected files, extract the description from the next line after the word Remittance and save the file with that name? Please note that there is a date format dd/mm/yyyy on the same line which is not required as part of the file name.
(e.g. file001/002 opened, the descriptions extracted would be ‘This is the file name for file 001’ and ‘The file name for file 002’,
Therefore file named file001 to be renamed This is the file name for file 001, file named file 002 should be renamed The file name for file 002.
If the files cannot be renamed but can be saved as with the required file name, than this would suffice as well. I am quite happy to delete the files manually.
Any assistance offered would be appreciated.
Is it possible for some code that would open selected files, extract the description from the next line after the word Remittance and save the file with that name? Please note that there is a date format dd/mm/yyyy on the same line which is not required as part of the file name.
(e.g. file001/002 opened, the descriptions extracted would be ‘This is the file name for file 001’ and ‘The file name for file 002’,
Therefore file named file001 to be renamed This is the file name for file 001, file named file 002 should be renamed The file name for file 002.
If the files cannot be renamed but can be saved as with the required file name, than this would suffice as well. I am quite happy to delete the files manually.
Any assistance offered would be appreciated.