Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

check folder exists and if not create a new folder

Community Beginner ,
Jun 30, 2016 Jun 30, 2016

Hi all,

is it possible to check whether the folder is already exists or not thru Javascript.

Since I can able to directly give the path and randomly create the filename.

However I have to create a datewise folder before placing. Also I have to get the windows login user.

for example

I have given a path as '\c\Siva\'

1. Under 'siva', I have to create a folder based on current date like '30062016'

2. In this folder, i have to place a file as 'windows_loginId&currentdatetime.pdf'

Could you please help on this.

How do we create a folder and get the windows login userID.

Thanks

Siva

sivamaddy​

TOPICS
Acrobat SDK and JavaScript , Windows
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2016 Jun 30, 2016

You do not have access to folders and files (with a few exceptions) from within Acrobat's JavaScript, this means you cannot find out if a folder exists or not, and you also cannot create a folder. You will have to do this outside of Acrobat. What I do in cases like this is to create e.g. a VB application that uses Acrobat's IAC interface to do all the Acrobat related stuff, and then the native OS support to e.g. create directories, move files, ...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2016 Jun 30, 2016

No, neither of those things is possible with Acrobat JavaScript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 30, 2016 Jun 30, 2016
LATEST

If you want this access in Acrobat or Reader you need to create a plug-in using the SDK  and install it to the appropriate folder. If you need to install this on others' systems you will have to register as a developer using the SDK.

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