Place the images with regex references

Hello

Let's say I have multiple images having the same 8 digits but different endings.

15889801BC.PSD

15889801BG.PSD

15889801BD.PSD

15889801_1.PSD

15889801BC1.PSD

I tried something like...

tmp = "/ 15889801" * \. [a - z] {3} /g » ;

myRectangle.place (file ("/ Volumes/Photos /" + tmp));

but of course, it doesn't. Is it feasible or should I make a loop looking for all the possible endings?

Thank you

Ben

It's a little easier that I described in this post. I have learned a few new things since then, I guess

You can subscribe .getFiles a generic regular expression, but you can also feed a function. The function is called for each object (which can be a file or a folder) with the file object as an argument and he must return to 'true' or 'false', where 'true' will include it in the result. (Because underscores that "the purpose of file" default returns the entire path and you obviously only want to test the "Filename" part.)

Your sample files list displays only the PSD files, but I understand that you also want to enter other types of files. Theoretically, you can use the generic regular expression ' 15889801 *.» ' * ', but with a function that uses GREP, you have more control:

result = Folder("/Volumes/Photos").getFiles ( function (anyItem) {
                    return anyItem instanceof File && anyItem.name.match(/^15889801.*\.[a-z]{3}$/i);
          });
alert (result.length+' files:\r'+result.join('\r'));

Note that I added ' ^' (beginning of string) at the start and 'i' used in the indicators of RegExp. I don't think that you need here of 'g' (Global) - first of all, he is beaten by my ' ^', in the second place, this would correspond to any occurrence of the string of numbers anywhere inside any file name. Then it would correspond to files where this string does not occur at the beginning of the file name. And the 'i' is so that it does not match only ".psd" but also ".» PSD»

The "$" at the end only provides and extensions exactly 3 letters are returned. Your version would not only "15889801.abc" but also "15889801.abcde" and even "15880901.psd.do_not_use.old_backup.indd".

If you find that the function returns too many files, including a couple of extensions, you do not want, you can always make an exhaustive list of the extensions you do want:

.. anyItem.name.match(/^15889801.*\.(psd|eps|etc)$/i);

Tags: InDesign

Similar Questions

  • What is the best way to place the image (with legend) in a book?

    I am preparing a model for an encyclopedia project, the encyclopedia will be in addition to 10000 pages, so what is the best way to place the images (Photos, graphic illustration,... etc) with a legend?

    The problem that when I change the text; the image does not move with it, and when I place it in the text, it is difficult to control text flow.

    Please help

    I think so, but it can be a little weird, if the position of the anchor is on the second page of a two page spread. Really, I jumped in to suggest the image and the legend of consolidation before anchoring.

  • Manually PLACE the images and other files in illustrator

    I see a tutorial of computer graphics by Nigel French, in this tutorial, when the option to place Mr. Nigel used to import images or other illustrator Illustrator files don't auto not put images at the centre but asks where to place the images or how large an area to be covered by this image or file.

    I'm looking at this topic, but not found anything relating to this topic, I don't know if it comes to plugin or illustrator function/feature.

    I hope that you will answer me,

    Here are pictures of serious

    Place 2.JPGplace 3.JPG

    You mean that the 'Gun place' with the symbol "1/1" inside? ".

    This was added in Illustrator CS6 (16.2.1 creative cloud version). If you have a lower version, it isn't here.

  • Place the image into the picture box and culture

    How to place an image in a simple picture box so I can crop and create a link? I don't ' want a slide show.

    Hello

    In the menu file-> Place. Go to your image and click in your page of muse. This places the image in the Muse. By default, all images are placed in the context of the Image. Double click on the image to select the image, you will get the options of transformation, expand and collapse according to your requirement to adjust the image in the Image. Check out the video below to see what

    http://TV.Adobe.com/watch/learn-Adobe-Muse-CC/working-with-images-in-Muse/

    Hope this helps

  • Help place the images - why they appear to 150% and a bad image?

    Hello

    Relative newbie here.

    I have my display performace in InDesign too high. If I "place" an image or just simply slip it on the page, and little matter which image file format I use (tif, png, jpg, whatever), when placed, the images appear about 50% bigger than the source and low - ish quality. I have then to try to manually resize them so they look good on screen and when printed.

    • Why when I place images not appear 100%?
    • Is it possible to resize images other than striking handles resize and hoping for the best?

    Thank you very much.

    OK, if the balance indicates 100% with the direct Selection tool, that's what you have. Note that using the regular selection tool (the black arrow) will ALWAYS show 100% in the areas of scaling unless you have set your preferences to 'adjust scaling percentage', this is why you use the direct Selection tool to check. You can also select the image with the tool and look at the Info Palette. the real and effective ppi listed will be the same at 100%. What resolution is currently in the range of information?

    I asked vs click, click and drag because in CS4 when you drag an image is still growing the image to fit. That's not true in CS3.

    Screenshots are generally 72 ppi to size, they are captured. 72 DPI is low for most of the printed work, but no one expects very much in terms of quality for screenshots. You really place, right, is not dragging from Photoshop in ID, which is the equivalent of collage? Paste a picture gives you only the preview screen in CS3. I'm not sure you will see a difference with a screenshot, however, since the preview will be also 72 dpi.

    If the image is really too large on the page you can evolve in ID now the Ctrl + Shift keys while dragging a handle. You must press the keys before you click the mouse in Windows because there is a bug. You can also use the scale tool, or enter a new value of the scale in the areas of scaling. You can use actual dimensions in these areas if you include units, incidentally.

    In Photoshop, you can adapt the image using Image > Image size... If you uncheck the 'resample image' the resolutiuon will change inversely proportional to size, in order to reduce the size will increase the resolution, but there will be no difference in quality during the scaling in ID.

  • HELP file, place the Image but will not go

    I converted a Word doc to html

    to be able to file, place images in blocks of text in CS4.

    When I file, place the image (was be a jpeg file), it placed, I turned and it reduces, but then it would not move.

    How to become mobile if I apply skin?

    If you place the image in the text block, so it is called inserted graphics and it doesn´t suppose to move around with the mouse more, it flows with the text.

    It s like a giant letter in your text.

    If you want to place your images in floating frames, Don t put them inside text blocks, drop them outside your page first, and then move them to the right places with the mouse or use X / coordinated in Control Panel.

    If you have need of your images still flows with the text, use the object anchor instead of inserted graphs...

  • can anyone provide a link to insert the image with the text on the button in the apex 4.2.6

    can anyone provide a link to insert the image with the text on the button in the apex 4.2.6

    ReemaPuri wrote:

    in the workspace image:-resign.jpeg

    As a button? Seriously?

    Ok. First of all, because the image already contains text, there no point in including the same wording in the form of text on the button. Accessibility requirements can be met using re-sign as alternative text. 4.2, create an image button:

    Tag/Alt text: Re-sign

    Static ID: re - sign

    Style button: Image

    Button Image: & WORKSPACE_IMAGES.resign.jpeg

    To make the image looks more like a button, add the following CSS to Inline CSS property page:

    #re-sign img {
      margin: 0 2px 2px 0;
      border: 2px outset;
      border-radius: 4px;
    }
    #re-sign img:active {
      margin: 2px 0 0 2px;
      border: 2px inset;
      border-radius: 4px;
    }
    

    Finally, there is a bug in 4.2 that generates the incorrect URL for the button images, which requires dynamic action of Page Load to fix.

    Event: Loading the page

    Action: Run the JavaScript Code

    Code

    var resignImg = $("#re-sign img");
    resignImg.attr("src", resignImg.attr("src").replace("/i/", ""));
    
  • I have a picture in the current folder that I can use to place the image on a page, but it is absent, if I try to hyperlink to it.  How to solve that?

    I use thimbnails which has a link to the expanded images.  I just loaded several file assets intothe images that I can then open and place the image on a page.  However, when I try to hyperlink to this image, the image is not listed in the assets.  Any ideas as to why and how to fix this?

    You should find the forum for any product it is and post your questions there.

    Here is a link to a page that provides links to all of the Adobe forums...

    The Forum links page: https://forums.adobe.com/welcome

  • How to improve the resolution of the image with the help of filters

    How to improve the resolution of the image with the help of filters?

    resolution of the image, please check the links below. They should give you a clear idea about the resizing and resampling of images.

    http://helpx.Adobe.com/Photoshop/KB/Advanced-cropping-resizing-resampling-Photoshop.html#m ain_Resizing_and_resampling_images

    Understanding vs Resample resize | Learn Photoshop CS6 | Adobe TV

    See you soon!

    ~ David

  • Trying to place the Image in sheared framework

    Hi all

    I'm trying to place an image in a sheared environment (see screenshot).

    However, when you place the image, the image is sheared to match the image.

    Is it possible to place the photo, so it is level/square, but fills the sheared framework.

    Thank you!

    After you have placed the image, you can correct the sheer by selecting the content and adjusting to 0

  • How to do an image have several clickable camp arrives with a box next to the image with a text. as I click on a bone in an image a box comes up next to the image with which are the OS.

    How to do an image have several clickable camp arrives with a box next to the image with a text. as I click on a bone in an image a box comes up next to the image with which are the OS. I have cs6

    This article has very clear steps & description of what you're trying to accomplish:

    http://Demosthenes.info/blog/537/enhancing-Imagemaps-with-CSS3-popups#wheelset

  • How to create an item of the display of the Image with functions Apex?

    Hi everyone :)

    I'm working on the 4.1.1.00.23 Apex in an 11g database XE.

    I want to display an Image in a report, I can do this by using the ' + BLOB download Format mask + ", but the images displayed in the original format and I want to display the smaller.

    I read that you need to create a procedure, a SYNONYM and call them to the src of the img tag. as Zsuzsi Vadasz mentions here
    http://blog.hilandco.com/2010/05/How-to-show-BLOB-type-column-as-image.html

    But I remember that I was able to create items in reports with the functions of the Apex, I think they were APEX_ITEM package, so I want to know if there is a way to create the '+' display Image + element with a function of APEX.

    Thank you.

    Diego (SniperCat) wrote:

    I'm working on the 4.1.1.00.23 Apex in an 11g database XE.

    I want to display an Image in a report

    Always specify if "report" means the report standard or interactive.

    I can do this by using the ' + BLOB download Format mask + ", but the images displayed in the original format and I want to display the smaller.

    I read that you need to create a procedure, a SYNONYM and call them to the src of the img tag. as Zsuzsi Vadasz mentions here
    http://blog.hilandco.com/2010/05/How-to-show-BLOB-type-column-as-image.html

    This post was obsolete when it was written. Use the built-in support of BLOB.

    Resizing of the declarative BLOB images in reports is simple using CSS. Add a style sheet with:

    td[headers="PHOTO"] img {
      display: block;
      width: 40px;
      border: 1px solid #999;
      padding: 4px;
      background: #f6f6f6;
    }
    

    where the value of the PHOTO in the attribute selector is the ID of the image column table header. Define only a single dimension (in this case the width) will scale the image with the correct proportions. (Background, padding and border properties are just eye candy...)

    However, the scaling of the images in the browser in this way is a huge waste of bandwidth and product of lower quality images than to create good scaled down versions using image tools. Image download megapixel and then to reduce them to the size of the thumbnail result in needlessly pushing millions of bytes which will never be seen.

    For better performance and image quality, and where you need specific image scaling of the best approach is to use the ORDImage database object to produce thumbnail and preview automatically versions. Unfortunately, this is not possible in Oracle XE as multimedia is not included :-(.

  • Urgent! InDesign CC, problems of placement of the image with Mac and Windows

    Hello

    When I tried to place an image or move pages in another file, indesign gives the following error.

    "The file does not exist, you may not, or the file is perhaps currently in use"

    I tried renaming the file, copy the file or re-edit the images... Nothing has worked... I am convinced that this is a problem with the mac and windows integration...

    How can I transfer files without problem from the Mac to the PC or vice versa.

    already solved...
    Mac OS permission issues.
    Adobe customer service solved the problem

    For more explanations and for your understanding...

    1. I create a template for my colleagues to work under Windows. Give them the files with a flash drive.

    2 employees were working on Mac...
    3. I took the model in a flash drive and tried to place some pictures...

    4 indesign gives me an error saying "the file does not exist, you may not, or the file may be in use by another application."
    5. I tried to recreate a link to images in document thinking "Okay maybe." it's a problem of link

    6 indesign gives me an error saying "the file does not exist, you may not, or the file may be in use by another application."

    7. I have tried to move the pages in the document to another, think "might be that I can work around this problem.
    8 indesign gives me an error saying "the file does not exist, you may not, or the file may be in use by another application."

    9. I tried to place another image to another folder

    10 indesign gives me an error saying "the file does not exist, you may not, or the file may be in use by another application."

    11. I tried to rename the file and after that the evolution of the file

    12 indesign gives me an error saying "the file does not exist, you may not, or the file may be in use by another application."

    I guess that this time there is no confussion in your mind...

    to cut the story short, it's a problem generated by authorization on Mac problems. It is resolved by defining the whole Adobe preferences folder and its contents to be read/write, not just read-only.
    In Mac OS: [Drive] /Users/ [username] / Library/Preferences/Adobe
    In Windows [drive] \Users\ [username] \AppData\Roaming\Adobe

    also after you change these files for read/write, you must copy the files you worked on once again.

    Thanks for your attention...

  • Uneven placement of images with SSD storage

    All,

    I'm running through a PoC project with a client using view 5.1 according to the instructions in "reference Architecture for VMware for desktops virtual stateless on Local Storage SSD with VMware View 5" as close as possible.

    http://www.VMware.com/resources/TechResources/10278

    I have all eight nodes identically configured with SSD storage room - once again all the model the same readers, all empty.

    Creating a pool of clones associated with this group creates a very uneven placement of the images.

    For example if I create a pool of 80 virtual machines on drives 8 distribution will be something like...

    Disc 1-30

    Disc 2-5

    Disc 3-0

    Disc 4-25

    Disc 6-10

    Disc 7-10

    Disc 8-0

    If I remove then 30 V in the pool, he can remove all 30 disc 1. At the time where every action on the pool must be controlled manually.

    Has anyone else hit this behavior.

    Someone can correct me if I'm wrong, but I thought that's the way it is designed.

    When you dial a number of offices the decision of balancing is put there, so all desktop computers will be will be on the data store / host (s) which has the less perceived load.

    Because you use local storage there is no opportunity to rebalance desktop computers.

  • Resize the image with HTML5 Canvas - distortion

    Hi all

    I'm working on a Webworks app where I need to resize an image to upload it to a server. I use JQuery Mobile, the application should run on OS6 and upward. The user can use the camera or select a picture, the power off. The corresponding code is the following:

    function handleOpenedFile(fullPath, blobData) {
                    var image = new Image();
                    image.src=fullPath; //path to image
                    image.onload = function () {
                        var resized = resizeMe(image); // send it to canvas
                        //Do stuff with the DataURL returned from resizeMe()
                    };
            }
    
    function resizeMe(img) {
    
                var canvas = document.createElement('canvas');
                var width = Math.round(img.width / 2);
                var height = Math.round(img.height / 2);
                canvas.width = width;
                canvas.height = height;
                var ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0, width, height);
                return canvas.toDataURL("image/jpeg", 0.8);
            }
    

    I then use the Base64 in the DataURL for download on the server. The images are reduced, but they are truncated. Parts of the image are shifted autour and colors come out strange. It is not scaling in itself than the mess to the top of the picture it comes out garbled if you draw on the canvas without any scaling.

    Does anyone have an idea how to solve this problem or have another suggestion to resize an image for download?

    I managed to solve the problem of resizing for anyone who takes place also in this. Replacement of

    return canvas.toDataURL("image/jpeg", 0.8);
    

    with

    return canvas.toDataURL();
    

    solved the problem with the strange visual artifacts. Returns a picture of resized without any strangeness.

Maybe you are looking for