Copy the text for the file name

I have looked around for this but have not found much. I have a server with thousands to print sheets of the evidence and from the beginning, long before me, the files have been saved with verbal descriptive names. It would be much better if they were registered according to the number of PO. All the evidence leaves have a number of purchase order listed at roughly the same place on the sheet... is possible to copy this number of the field in the pdf file and save the file in a new folder under the file name using a script using this number?

Thanks in advance.

Maybe if:

// Find645_NumberInDoc.jsx
// http://forums.adobe.com/thread/1221811
// regards pixxxelschubser

//var destFolder, sourceFolder, files, fileType, sourceDoc;   // "your" sourceDoc is in the other part always defined as aDoc
var destFolder, sourceFolder, files, fileType;
var aDoc, DocName, aDocPath, aTFrame;
var searchString = /^6\d{6}/;
var searchString2 = /^6\d{6}_/;
var saveOptions = new PDFSaveOptions();
saveOptions.pDFPreset = "ProofCopy";

//sourceFolder = Folder.current;
sourceFolder = Folder.selectDialog();
if ( sourceFolder != null )
{
    files = new Array();
    fileType = "*.ai";
    files = sourceFolder.getFiles( fileType );
    if ( files.length > 0 )
    {
        destFolder = sourceFolder;
        //for ( f = 0; f < files.length; f++ )
        for ( f = 0; f < 4; f++ )   // --------------- only 4 files for your testing
        {
            aDoc = app.open(files[f]);

            //alert(aDoc + " opened");
            // --------------- now was opened a document
            // --------------- and here should be the rest
            DocName = aDoc.name;
            aDocPath = aDoc.path.fsName;
            aTFrame = aDoc.textFrames;
            for (i=aTFrame.length-1; i>=0; i--) {
                contentString = aTFrame[i].textRange.contents;
                result = contentString.match (searchString);
                DocName = DocName.replace (searchString2,'');
                if (result) {
                    var SaveName = aDocPath + "/" + result + "_" + DocName;
                    SaveName = SaveName.replace(/\.ai$/,'.pdf');
                    i=0;
                    }
                }

            if (result) {
                alert("SaveName: "+SaveName);   // --------------- only for your test
                aDoc.saveAs( new File(SaveName), saveOptions );
                // --------------- now close the active Document and go to the next in the loop
                aDoc.close (SaveOptions.DONOTSAVECHANGES);
                } else {
                    alert ("No match found - document remains open")
                    }

}
}
}

Tags: Illustrator

Similar Questions

  • copy the file directory into an Excel sheet

    How can I copy the file names in a directory/folder to an Excel spreadsheet? For example, I have 200 files in a folder. I want to copy the title of all the files in an Excel sheet to better management and add notes. Thank you

    I received an email go, but I can't respond to this e-mail address.
    Here is my supplementary question:
    "Thanks a lot for your help."
    It's one more step.
    But I want just the names of files on each cell in the Excel sheet, without the path. »

    Open the folder, and then select all the documents in question.

    Hold the shift key while clicking the right mouse button (shift + right click).
    Choose "copy as path".
    Return to the spreadsheet and choose "Paste" to paste the list of documents in the worksheet.
    This will paste the full path, including file name, of each document, as shown below.

    Is that what you meant? Please let us know.
    Best wishes
    BookwormDragon
  • How can I change a SINGLE CHARACTER in the file name?

    I have in the Panel right side meta tag a file name, the original name and copy name field.

    The file has been renamed already. So I'm not interested in original file name, in any case I can't click on it.

    "I would like to change a +! / « % / « + ! CHARACTERS in the file name field which is 50 characters.

    If I click on it gives me a window of batch renaming.

    If I click on the name of the copy that I have to write everything from scratch BECAUSE I can NOT COPY the file name field.

    So here we are in the 21st century

    I have a solution: I copy the name of the file from the vista Explorer and paste into copy name BUT what if I do this hundreds times?

    First of all, bringing the name of copy to do with the file name? I think you are badly understand the purpose of the copy name field. It's to give a virtual copy a distinctive name.

    Now for the naming of the files is... If I understand, you want to change the name right in the metadata Panel, but the file name field is not editable. It is a bug. It is exposed when you have multiple selected files and change the display of the metadata Panel. You can fix it temporarily by selecting a single file in the grid and change the display of the metadata Panel of any defect or vice versa (see the attached screenshot). Now that the field become editable, you change the character.

    If you want to for hundreds of files by using a template, then would be nice if you provide your source and target file name patterns.

  • Cannot right click Windows 7 Explorer of files to generate the copy of the file names in a Notepad or Excel-compatible file. HELP REQUESTED!

    I struggled for several hours to restore the service right click that I used to have XP to Windows 7.  I need to save lists of file names such as displayed in the file Explorer. Allowing you to right-click and save files in Notepad. This option has been removed in Windows 7 and anything put in place to restore it.

    I have lists of items in the inventory and need to copy and paste the image corresponding to a transfer sheet to allow the server names to match images in article SKU.  The file names are long and typing is a complete waste of time.

    I used to be able to find them in the Windows Explorer, right-click on the directory and generate a txt file that I could open in Notepad or Excel.  -Easy.  Now right-click only allows an export in an uneditable image in ONE NOTE. This is useless for me. I can't do anything with an image file - I need the editable data.

    Is there a solution?  I need only the file name and extension, not the full path, in a text or spreadsheet document propagation.

    I had used the Microsoft solution to install their dose without knowing the final format was a NOTE image file format and not a simple txt file. I try now too write the batch file:

    %windir%\Printdir.bat

    or edit it in order to keep the file in Notepad and do not make the final conversion into a single Note.

    The problem is that the fix from Microsoft, designed to fix this problem, has placed the conversion file in the root directory and it cannot be overwritten.  I refused the possibility to delete, edit or write the file due to the requirements of administrative privilege mandated by the security of Windows 7 too much.

    So if anyone has a solution to every problem - that would help - I am very tired and frustrated and not happy with Microsoft.  Their zealous concern with security made their unnecessary programs for me and have further discouraged me to convert to the windows 10. frustrations and nightmares are waiting for me there I can't imagine.  What I really want to do at this point is to go back to XP.

    He ate five hours of my day. I don't have the time to fight like that. I am trying to be productive, but all I got are monumental technical walls and roadblocks - often designed into the system. Frustrating doesn't begin to describe it.

    Found a solution on a Web site:

    http://www.watchingthenet.com/how-to-print-a-directory-tree-from-Windows-Explorer.html

    They said it was for VISTA, but worked for me under Windows 7. You will need to use Notepad to the command prompt and select run as administrator to save the file in the root directory.

    Thanks for the help.

    Cheers.

  • Error message: "the file names would be too long for the destination folder.

    I move the files from internal hard drive to external hard drive using cut and paste.  I get a message "the file name would be too long for the destination folder.  You can shorten the file name and try again, or try a location with a shorter path. "I then gives me choices to skip or cancel.  What happens to files that are ignored?  Are they deleted?  I don't want to lose all the data, but there are more 2 000 files with this problem, so passing by and rename each one really isn't a viable solution.  I don't really understand how the file names were originally created/saved about a problem that is only now that I want to move them.  The disc source and destination are NTFS.  Is there a solution for this?  It is imperative that no data is lost.  Thanks for any help you can offer.

    On Wednesday, 10 April 2013, 12:16:23 + 0000, MADinIowa wrote:

    I move the files from internal hard drive to external hard drive using cut and paste.  I get a message "the file name would be too long for the destination folder.  You can shorten the file name and try again, or try a location with a shorter path. "I then gives me choices to skip or cancel.  What happens to files that are ignored?  Are they deleted?

    N ° to check that what I say is correct, create a new folder
    for the purposes of the trial and to make a copy of some files. To ensure that
    one of them has a long name (rename if necessary), and then try to copy
    These files on the external drive. When you get the message, choose
    'jump' and see what happens.

  • You are looking for a way to set permissions of files on a folder so that users can view and copy the files out, but may not change the original file in the folder.

    You are looking for a way to set permissions of files on a folder so that users can view and copy the files out, but may not change the original file in the folder.  They will have to copy the files in the folder to make changes and then copy a review of back in.  Locally and on the network

    Hello

    1. In Windows Explorer, right-click the file or folder you want to work with.
    2. In the context menu, select properties and then in the Properties dialog box, click the Security tab.

    3. In the name list box, select the user, contact, computer, or group to which you want to display permissions. If the permissions are grayed out, this means that the permissions are inherited from a parent object.

    https://msdn.Microsoft.com/en-us/library/bb727008.aspx?f=255&MSPPError=-2147217396

  • Save the file as font size for the file name

    I have a monitor resolution of 3840 x 2160 and for some time, using 150% dpi, but I loved how everything went wrong because of that and my second monitor is a 1920 x 1200, so everything went really wrong about that. so I changed the dpi at 100% and used the color editor and the appearance to change the size of the icons and the font size. but some policies do not always change. When I save a file, the file name is really small

    and difficult to read. How can I change the size of the font for this without having to resort back to the ugly dpi of 150%.

    some other small texts which seem not to be able to change the editor are like the taskbar menu, and launch the menu properties, msconfig and options in the menu to stop (from the task bar.)

    Hello

    Sorry for the delay in responding.

    Your user profile is a collection of settings that make the computer look and work the way you want. It contains your settings for wallpapers, screensavers, wallpapers, pointer preferences, settings of the sound and other features. User profiles ensure that your personal preferences are used whenever you log on to Windows.

    You can create a new user account and check if that helps. If the problem does not occur in the new user account, you can transfer the files from the damaged to the new user account by using the article user account "difficulty a user profile is corrupted.

    Create a user account: http://windows.microsoft.com/en-IN/windows7/Create-a-user-account

    Difficulty a user profile is corrupted: http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    Keep us in the loop to help you further.

  • What does it mean when windows 7 can't copy the files required for installation?

    I tried to install windows 7 on my Dell.I have xp on it, but when I run the first step of copying the files it stops to 60% and says "windows cannot copy files required for installation. Make sure all files required for installation are available, and restart the installation. How can error code 0 x 80070001"I fix?

    See if this post is of no help: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/error-0x80070001-cannot-copy-files-needed-for/e2b51d33-adad-43a1-b37f-19537bdfee2a

    J W Stuart: http://www.pagestart.com

  • Trying to download music or copy files to a cd, I get the message "the file name is invalid or too long.

    Trying to download music or copy files to a cd, I get the message "the file name is invalid or too long.

    Hello

    1 when you download the files?

    If the files are located in deep in the files to copy or cut the file on the desktop or on the desktop and then check please.

    You can check the blog next deal with a similar problem.
    Team Build and 260 + character paths
    http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • I keep asking myself for permission to copy the files, etc. How can I turn this off?

    I keep asking myself for permission to copy the files, etc.  How can I turn this off?

    Hi Kasggr,

    You are be prompted for approval because of her User Account Control (UAC) and it is not wise to turn off UAC.

    User Account Control (UAC) is a feature in Windows that can help prevent your computer from unauthorized changes. This UAC asking your permission or an administrator password before performing actions that may affect the operation of your computer, or that change settings that affect other users

    By verifying these actions until they start, UAC can help prevent malicious software (malware) and spyware from installing or making changes to your computer without permission.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-user-account-control

    Enable or disable the User Account Control
    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-user-account-control-on-or-off
    http://social.msdn.Microsoft.com/forums/en/WindowsSecurity/thread/c6be4563-4593-4741-ba70-c50fb3636863

    I hope this helps.

    Bindu S - Microsoft Support

    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Cannot find filename when looking for a part of the file name.

    I'm just trying to do a simple search.  I have a few hundred files in a number of subfolders and above I'm looking for right in the file name (in the upper right corner of the browser) and he doesn't find anything.  This is getting very, very frustrating.  It seems to randomly find some files... but no more.

    Is there some settiing I need to change?  What is the problem?

    Well - I thought of her.  Despite light in several places that the 7 search automatically applies a generic search at both ends of your criteria, is not.  So, let's say that I was looking for the file name "aaaxyzbbb.txt"... the search for "xyz" found nothing.  But "* xyz" found what I was looking for...

  • What is a * successful * way to search for files containing a specific word that is not the file name?

    I've seen several threads on forum Windows 7, but no successful response.  I desperately need to find documents that contain a certain word * in * the file is not part of the file name.  It was easy under Windows XP, but it seems that they removed this feature in Windows 7, and it's really causing me problems.

    So let's say the word is 'author '... I need to find all files that contain this word, even if "author" is not in the name of the file.  I've seen different "fixes" posted by MS Tech support, but none of them work.  I tried "contains:", search filters, checking the box "always search file names and content" and nothing works, even if I saved at least a dozen documents that contain that Word.  And no, I'm not he shell.  I checked and I found at least one of them just by hunting around.  I also tried the uppercase and lowercase without result.  I would like to avoid having to download the 3rd party software.

    Please help, there must be a way!

    There is also the alternative prompt BACK, requiring no download:

    Looking for content regardless of the type of file: http://www.computerhope.com/findstr.htm

    If you have never done stuff with a DOS command prompt before, then there is some learning to navigate a file system to see well.

    (Try you the term "content:" and not "contains:" right?)

  • Error code 80070570 0 x to copy the files from the external hard drive for pc under win 7

    I'm trying to copy files from my external hard drive to my pc.  I'm running Windows 7 on my dell Studio and get the error code 0 x 80070570 on several files. Says they are corrupt.  How can I solve this problem?

    Click Start > computer

    Right-click on the external hard drive

    Click Properties > tools

    Click check now to check your hard disk for errors.

    After it is finished, restart the system and try to copy the files again.

    Releasing it's easy: with Windows | ActiveWin | Laptops | Microsoft MVP

  • Given the file name or path contains Unicode or DBCS characters. Retry using ASCII characters for the file name and path whatever that means? This happens when I publish an OAM

    Given the file name or path contains Unicode or DBCS characters. Retry using ASCII characters for the file name and path

    What does that mean? It happens when I try to publish an OAM for Dreamweaver.

    Also: How can I specify the onboard browser animate? It's just going as far. Are there no preference to animate it dashboard?

    BTW. Just call him edge. Seriously. You call Illustrator draw? Photoshop editing?

    No, my file name is mainContent.oam

    My project name is mainContent.an

    This error occurs when I try to import into Dreamweaver. Sorry, I was unclear about that earlier.

    I thought maybe it was because I had saved my image as a png image. So re-saved as an svg, still get the error.

    Should I have a setting is CC of Dreamweaver that will not? I should try this in Dreamweaver CS6? I might try that next.

    Why is this so difficult program? I know that Flash. I know that After Effects. I can work the chronology part simply awesome. He's still export I have problems.

    On a MacPro, 10.7.

    You are a person of Adobe or simply a beautiful assistance program?

  • By specifying the file name for FTP out OSB transport

    I want OSB based service that will send via FTP a file with a specific name to a remote ftp location.
    It seems that OSB cannot do this because the FTP transport on a business service only allows you to specify the prefix and the suffix, and then generates a file name long great for midlle parties.

    Anyone know how to replace it and specify the name you want to call remote file name?

    mdsrobbins wrote:
    Your answer was useful, but being new OSB I'm not yet quite there because I want to spend a "variable" in the name of the file. Now I want a CSV file, I've specified a service proxy in a format MFL behind a jms messaging ftp queue. Business service underlying it is the ftp using the MFL format service. This works all I in the message flow to the proxy I can't have access to a user defined property that contains the name of the file that I could then pull and stuff it into the header 'Filename' as suggested above.

    DOE, anyone got any ideas how I can get access to a property of a JMS message file name?

    What I understand
    JMSQ - JMS PRoxy (MFL) - Pipeline---> BS (MFL/FTP) - FTP server

    If you want to set the file name contained custom JMS message headers? When creating your Proxy JMS you must follow these steps
    (1) for the creation of Proxy JMS in the transportation Configuration page select get all the headers = Yes
    (2) if the name of the file is set as defined by the JMS message property user then use $Header in your pipeline/message flow. This variable can contain your user-defined properties. If the user sets the property is part of the JMS message and then use $body.

    Thank you
    Maury

Maybe you are looking for

  • Windows OS ISO 8.1

    Hello my friends, I have a question, I went to the MS Site and downloaded a windows OS ISO 8.1, my system has win 8.1 pre-installed, the time is right and I need to get a hard drive again and reinstall can I use retail OS from MS? It will automatical

  • Apple Mail, do not synchronize with the server

    Lately, I've been a very frustrating time with Mail. The emails that arrive in my Inbox, I will switch to a personal folder or in the folder to archive. While in reality, they move to the folder selected, when I re - open the Mail app the next day, t

  • Determine the good thinkpad dock

    Hey,. I got a ThinkPad T440p and plans to make a docking station. Since I never got one before I was confused about which we should get. I wanted to get the thinkpad Dock Ultra but was confused about how I would determine if I should get the 90W, 135

  • How to convert labview projects in the class diagram

    Hello I don't know if this option exsit in labview, but if she does will really help. How can I convert a labview in class diagram project?

  • Windows 7 - defragmentation

    The operating system of my computer is Windows 7. I have professional CCleaner through which I scan my computer once a week. Do I have to use a Defrag tool to defrag my computer regularly. If the answer is Yes please be good enough to recommend avail