How to remove blank spaces or part of a PDF file name?
Question
Solution
- Start the program, click "File->Add PDF Document" or "File->Add Folder" to add PDFs to the file list;
- Choose "Advanced" Rename Method, then input script in box, use the "abc def ghij" as example:
A. Delete blank spaces, use below script:
Begin
newFilename := AnsiReplaceStr(Filename, ' ', '');
End.B. Delete part " def", use script below:
Var
p :Integer;
Begin
p := Pos('' def '', Filename);
if p > 0 then
newFilename := LeftStr(Filename, p - 1) + RightStr(Filename, Pos(ReverseString('' def ''), ReverseString(Filename)) - 1);
End.; - Run the script and preview the effect of renaming in the list, then click "Rename" button to rename all listed files.
Related products
- A-PDF Rename - batch rename multiple PDF document based on content, metadata and file attributes(Size, Datetime) within PDF files. You can batch change or update multiple PDF files metadata (title, creator, producer, author, subject and keywords) as well as
- A-PDF Preview and Rename - Preview PDF content easily, rename PDF based on content you previewed.
- A-PDF Preview and Move - Preview content for multiple PDF files, then OCR page content to rename and define dest folder to move.
We always like improving our products based on your suggestions. Please send your feedback (or ask questions) to us in the contact page.