How do I process all the files in a folder simply?

I need some help with a task I’m working.  I need to access a folder filled with 50+ PDF files and put password protection on each one.  The files will have specific 6-character names and I want each file to always get the same password.  This task would run twice monthly.
                So far I have a working solution with a flaw.  In ADOBE Acrobat professional, I created a separate security policy for each of the 6-character names, assigning each a password.  Using Batch Processing, I run a JavaScript program to password-protect the files.  This process works okay, but the flaw is the need for excess manual processing.  I want the process to spin through the files without any further confirmations from me.  As it is, I have to push the OK button once for every file in the folder.  This is inconvenient.  Is there a way I’m missing to accomplish my goal.
                The script I’m using follows:
/* Applying a Security Policy to a PDF Document */
var ASISecurityAll = app.trustedFunction(
function()
var oMyPolicy = null;
var rtn = null;
var sPolNam = "ASI000";
app.beginPriv();
// First, Get the ID of SimplePassword security policy
var aPols = security.getSecurityPolicies();
var fnm = this.documentFileName;
var fnm6 = fnm.substr(0,6);
var sPolNam = "ASI000";
sPolNam = "ASI" + fnm6.substr(3,3);
for(var i=0; i<aPols.length; i++)
     if(aPols[i].name == sPolNam)
          oMyPolicy = aPols[i];
          rtn = this.encryptUsingPolicy({oPolicy: oMyPolicy });
          break;
app.endPriv();
ASISecurityAll();
Thanks for assistance.

The code shown is straightforward and understandable. If you don't intend to use it in Acrobat 7, you may even replace the loop throgh the policies array using the indexOf() array object method (introduced with JavaScript 1.6, supported in Acrobat 8 and newer), to simplify the code.
According to the documentation for encryptUsingPolicy(), manual interaction may be necessary, depending on the policy used. You might look at the policies if you find ways to reduce interaction.
As an alternative, you might look at third party products which would provide encryption etc. (such as the ones from Appligent, which are command line utilities, and are therefore more suitable to be embedded in a process).
HTH.

Similar Messages

  • How we can get all the files in FTP folder

    Hi all,
    My requirement is need to retrive text files from FTP folder to application server.
    For this i am using FTP_SCRAMBLE
                                FTP_CONNECT
                                FTP_COMMAND function modules.But i dont know how we can access particular folders and all files in Particular folders.For this i dont know the process and is there any commands to see all files in a folder.
    Very Urgent...
    Thanks and Regards,
    Siva.

    Hi,
    Check the link below:
    Re: How can we upload a file from ftp server
    hope this helps.
    regards,
    Sharath

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • How can I delete all the files in the Adobe CS4 Master Collection from my machine?

    How can I delete all the files in the Adobe CS4 Master Collection from my machine. I have tried Control Panel but it will not do anything, there are no error messages, it is like as if it is ignoring my instruction. Why should it be so difficult to delete programs one does not want. Any ideas please.

    Moved from Cloud forum to Downloading, Installing forum
    Try running the Adobe Cleaner Tool
    http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

  • Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the ca

    Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the camera the port out is to use a USB data cable to a laptop for my macbookpro can not read the contents of the file and the camera. I also want to use the lens on the camera as a substitute for the embedded camera on my macbookpro, what should I do to replace the embedded camera on macbookpro with sony camera so that the camera could be more variety and can I record when I turned macbookpro . Please help for this so that I can quickly capture the results from sony camera to my macbookpro. Thank you.

    See this page http://macosx.com/forums/networking-compatibility/296947-sony-camcorder-my-mac.h tml - might be some helpful tips there.
    Clinton

  • How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    How can I copy all the files from my iMac to an external drive so they remain as 'regular accessible files'? I want to clean my dive

    You can use a program like Carbon Copy Cloner.  It will clone your HD to the external.  The format is the same as your internal drive and you can boot from it using Option key at boot time.
    http://www.bombich.com/
    Regards,
    Captfred

  • How do I empty all the files in the "Downloads" folder ?

    How do I empty all the files in the "Downloads" folder ? Can they all be deleted at once?

    PS: when you look into the menu bar commands by mouse, you may note
    there are keyboard shortcuts to perform the same tasks; such as they are.
    *Edit> Select all* = uses 'Command + A' keys to do this, without mouse/menu.
    And, it can be done quickly by keyboard. +(this will select all, for the next step)+
    You would have to select the folder to be edited; yet there also are other key
    board commands to select items, folders, applications, etc all without a mouse.
    Once you choose items in a folder or other location, you can then use a
    keyboard command to Move them to the Trash; from there, Empty Trash
    with a three-key command; all without use of the mouse.
    The keys to *Move to Trash* looks like it is 'Command + Delete'. Some key-
    boards have two marked delete keys, so you may have to try both. The
    +small delete key+ has an icon with right-facing x in a box.
    The three keys, to *Empty Trash* via keyboard instead of menu bar/mouse
    appear to be the combination of 'up-arrow, command, delete.'
    Understanding some of the iconography of symbols used to indicate function,
    or what keys to use, as indicated by icons instead of words, is not too hard.
    There are articles and web pages which show various keyboard shortcuts.
    Here's an example, from one of several I've bookmarked over a few years.
    This one has images and shows what the key shortcut symbols mean.
    • Mastering Keyboard Shortcuts: (from myfirstmac site)
    http://www.myfirstmac.com/index.php/mac/articles/mastering-keyboard-shortcuts
    • Mac OS X keyboard shortcuts:
    http://support.apple.com/kb/HT1343
    However, if you have anything you may want to keep before mass deleting, be
    sure to move it into another folder. +re: The docked folders in Leopard+ 10.5 have
    one .PDF in each, about each of the purposed folders. I haven't deleted mine yet.
    {And I've added another folder into the dock near the Trash for my own alias items
    and the original is on the hard disk drive (one user) or could be put into an account
    folder so it would not have permissions or privilege issues with a second account.}
    I'd thought about those 'keyboard symbols' after the first posting; but,
    had to take an elder parent on several errands that took quite awhile.
    PS: there probably are ways to use AppleScript and Automator to handle folder contents.
    Good luck & happy computing!

  • How do i wipe all the files and information on my macbook air?

    how do i wipe all the files and information on my macbook air?

    Are you selling this machine,

  • Read all the files in a folder over and over again

    I want to develop an application that reads all the files in a folder, and once its done reading those files it reads all the files again.
    The purpose for this application is to read all the files in a folder that are continuously being stored in that folder, so that when a new file is created, that file is also read by the application. I then need to compare the date and time in which the file was created to the actual date and time of the system, so that way I can get the most recent file, and then  I will do other operations with this file.
    The thing is that I know how to read all the files in a directory, but I don't know how to cycle through those files again, in order to look for the most recent one, and I don't know how to make the comparison of the time stamps, because I need a precision of one second in the system time and the time the file was created.
    Can someone please help me?
    Thanks in advance!
    Solved!
    Go to Solution.

    I think that I just went the wrong direction.
    What I wanted to do in the first place, was to rename and overwrite every new file in a directory with the same name and file extension, so that every new file overwrites the old file. The thing is that the list folder only lists the files the first time and then keeps on telling me there are no files to be read even though there are new files.
    What I need now is a way to overwrite the old files with the same name, and keep searching for every new file that is going to be stored in the directory.
    I will leave the code that I have right now, so that you can tell me what do I need to modify in order to read every new file that's going to be created in that directory.
    Thanks in advance for your help!
    Attachments:
    Overwrite Files.vi ‏12 KB

  • The Date Accessed attribute is resetting to all the files in a folder

    Hi all,
    I have an issue that the "Date Accessed" attribute is often resetting to all the files in a folder if i open single file as this folder is from File server mapped as Drive to me. This is happening to all the users whoever connect to that fileserver
    and i see same issue from RDP as well. is there any option to check which is resetting the "Date Accessed" attribute to all the files. The Date Access attribute is simillar to Date accessed and Date modified. We need to fix this issue as it is related
    to security concern for us. The file server is windows 2008 R2 and the client machines are windows 7.
    Side note: I can see that there is no software, antivirus, offline sycn is causing this issue.
    Thank you,
    Sampath
    P.Sampath

    Hi,
    It seems that some specific process accessed the files and updated the attribute. You could configure auditing on the shared folder. Then you can go through the auditing log to check which process is doing the read operation on all these files. 
    Configuring Audit Policies
    http://technet.microsoft.com/en-us/library/dd277403.aspx
    Best Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How do I tag all the contents of a folder?

    How do I tag all the contents of a folder?
    I'm trying to add an archive tag to a lot of files and folders, and is it possible to just tag the parent folder and all files and folders within it to adopt this tag, so that when I come to search for a document later on, and it has an archive tag, I know to dismi

    Ideally, the program you want to delete has an 'uninstaller' application and that should delete all the files. If that isn't available you could download and run this free app: http://www.freemacsoft.net/appcleaner/
    Probably not as thorough but it will do the job of ridding you mac of most of the files associated with the app you no longer want.

  • How do i merge all the files in a directory into a single file

    I need to merge(or move) all the files(all are .txt files) in a directory into a single file?

    Thanks Martin, but I was searching for an inbuilt class or a stream like the SequenceInput class that could do this for me.

  • How can I check all the files on an external volume?

    I recently had a problem with my external where the directory got messed up. Disk Warrior seems to have fixed it, and I've run both that and TechTool Pro on it to check the files and so far both have said they're fine, but I'm still worried. I have quite a few files on there and each time they test it takes only a few minutes where if you verify say, a DVD of files it takes 5-10 minutes just for that, and that's 4GB to 1TB.
    Is there any way I can test all the files on the volume, much like verifying them, to see if there has been any corruption or data lost?

    You're a very helpful person, aren't you? Lol.
    I have checked a bunch of video files that were on my external pre-trouble that I was able to transfer to my internal drive and run perfectly. Unfortunately there are far too many other files to check them all, all of my music on there as well as all my font, work and resource files so there's tens of thousands of files on there. Checking them all manually is not an option.
    Thanks for the reassurance though. Hopefully at some time in the near future Blu Ray will be cheap enough that I'll be able to back up all my data to disc regularly, until then I'll just have to rely on my external.
    Thanks for the help!

  • Is possible search all the files in one folder and get list all with the same extension.??

    Hi,
    I would like to get, if it is possible, do searching in one determinate folder and get all the files with the same extension, For example, Give the *.pou and get all the files on one list of the files in this folder and sub-folders...
    If it is possible i would like to see any example.
    Thanks a lot, Fonsi.

    Hi Dennis,
    I got your advise, I download the openG (i had problems, and downloading directly and install one to one).
    Ok, i got but i have one problem, which i can't solve. I entry the promt  to search and put the directory to save, later i push 'Do it' and it search the files, show the paths and number, then save in the folder and finally show the window , all ok!.
    The problem is with the target path, when i want use the browse, it doesnt run properly. I want select one carpet, and it demands one file, i dont understand why??, i changed the options browse but it didnt work. Also i would like when i put one path if folder doesnt exist, directly create it and save the files, if exist copy it.
    Thanks for all!. I attached the file in lv 7.1
    Attachments:
    buscar3.vi ‏50 KB
    capture.GIF ‏48 KB

  • Can someone upload all the files in iPod_Control folder?

    I need to get all the files from the iPod_control folder especially the one that is in the \iPodcontrolgamesRO. I've accidentally deleted those files that caused my games corrupted. Could someone just upload a .zip file of it. I really really need it. Hope that someone could help me. thanks !

    Originally Posted by spond
    Aspirer,
    you can just re-run the install, and specify only the PXE component -
    that way you will get the correct version
    Shaun Pond
    Our company use ghost for a long time.
    Now I am trying to persuade my IT boss to replace to the ZENworks one.
    So I can only test from my site.
    by adding ZEN pxe boot menu to existing pxe boot menu.
    Thanks anyway.

Maybe you are looking for