Need an Acrobat JavaScript to do the following:

Community Beginner ,
Nov 16, 2017

Copy link to clipboard

Copied

01. Number pdf file names in a folder.

02. ADD a number at the beginning of each file name but not change the original file name.

    examples: abc.pdf becomes 0001 abc.pdf; xyz.pdf becomes 0002 xyz.pdf etc.

03. To make this less complex, add a 4 digit number (0001, 0002, 0003 etc) unless there is a way to fine tune the number of digits depending on the number of files in the folder.

Correct answer by sports03 | Community Beginner

Thanks a bunch.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

114

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Need an Acrobat JavaScript to do the following:

Community Beginner ,
Nov 16, 2017

Copy link to clipboard

Copied

01. Number pdf file names in a folder.

02. ADD a number at the beginning of each file name but not change the original file name.

    examples: abc.pdf becomes 0001 abc.pdf; xyz.pdf becomes 0002 xyz.pdf etc.

03. To make this less complex, add a 4 digit number (0001, 0002, 0003 etc) unless there is a way to fine tune the number of digits depending on the number of files in the folder.

Correct answer by sports03 | Community Beginner

Thanks a bunch.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

115

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 16, 2017 0
Most Valuable Participant ,
Nov 16, 2017

Copy link to clipboard

Copied

JS can't rename files.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 16, 2017 0
Adobe Community Professional ,
Nov 16, 2017

Copy link to clipboard

Copied

What Try means is that the Acrobat scripting environment is sandboxed for security, and so the model has very limited access to the local file system. There simply is no functionality for what you want to do.

So, your best option, since your task is all in the file system, is to use an easily accessible scripting/programming language for your system. Something like Batch Scripting if you are on Windows, or AppleScript if you are on a Mac.

If you are a VB programmer, then that is the best way to do it on Windows

Also lookup "Windows Scripting" on Google.

Well Actually, there is a way to do something like this in Acrobat. You can create an "Action" that will open all the files in a folder and save them to a different folder with new names. But not as clean as the previously discussed solutions.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 16, 2017 0
Community Beginner ,
Nov 16, 2017

Copy link to clipboard

Copied

Thanks to you guys for the feedback. I'm not a programmer so vb is out. Could you give me some ideas as to how to do the open and save with new names without doing it one file at a time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 16, 2017 0
Adobe Community Professional ,
Nov 16, 2017

Copy link to clipboard

Copied

See this Tutorial

https://acrobatusers.com/tutorials/how-to-create-and-share-actions

Acrobat DC is a little different,

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 16, 2017 0
Community Beginner ,
Nov 16, 2017

Copy link to clipboard

Copied

Thanks a bunch.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 16, 2017 0