Script for layer redundant batch delet

I have thousands of files in different folders, each file has the same layer named "job Info". Can someone help me to write a script for led this layer per-folder?

layerInfo.jpg

I expected, the script tells me that I need to select a folder, then it can automatically open files, del layer "job info" then save the file, rewrite, close file

Hello

Try this.

var folder = Folder.selectDialog ("Select the root folder");
var myfiles = [];
getsubfolderfiles(folder);
for(var i =0;i -1){
                myfiles.push(filelist[i]);
            }
        }
    }
}

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • Photoshop layer redesign, rename the script for Illustrator

    The Photoshop scripting guru Paul R more to RetouchPro has created a really cool to rename script and layers of selected Photoshop batch numbers. I did find something similar on the side of the Illustrator.

    He gave his permission for me to post it here in hopes that some Illustrator scripting genius could come up with a similar script for Illustrator. It would be terribly difficult to convert into something that could use Illustrator?

    http://www.mediafire.com/file/g7usr73u0236p0a/rename _ & _Renumber_Selected_Layers.jsx

    http://www.mediafire.com/file/dbah74x13bsa74c/rename _ & _Renumber_Selected_Layers.jsx.zip

    rename-layers.png

    Hola Julio, I updated the script to rename the sublayers or visible layers and also fixed the color

    #target illustrator
    
    main();
    function main(){
        if(!documents.length) return;
        //var allLayers = app.activeDocument.layers;
        var win = new Window( 'dialog', '' );
        g = win.graphics;
        //  var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]); // CS5
        var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.50, 0.50, 0.50, 1]); // CS6
        g.backgroundColor = myBrush;
        win.orientation='stack';
        win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
        win.g1 = win.p1.add('group');
        win.g1.orientation = "row";
        win.title = win.g1.add('statictext',undefined,'Rename Visible Layers or Sublayers');
        win.title.alignment="fill";
        var g = win.title.graphics;
        g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
        win.g5 =win.p1.add('group');
        win.g5.orientation = "column";
        win.g5.alignChildren='left';
        win.g5.spacing=10;
        win.g5.st1 = win.g5.add('statictext',undefined,'New layer name');
        win.g5.et1 = win.g5.add('edittext');
        win.g5.et1.preferredSize=[250,20];
        win.g10 =win.p1.add('group');
        win.g10.orientation = "row";
        win.g10.alignment='fill';
        win.g10.spacing=10;
        win.g10.st1 = win.g10.add('statictext',undefined,'Serial Number');
        win.g10.et1 = win.g10.add('edittext',undefined,'1');
        win.g10.et1.preferredSize=[50,20];
        win.g10.et1.onChanging = function() {
          if (this.text.match(/[^\-\.\d]/)) {
            this.text = this.text.replace(/[^\-\.\d]/g, '');
          }
        };
        win.g10.st1 = win.g10.add('statictext',undefined,'Length');
        var nums=[2,3,4,5];
        win.g10.dl1 = win.g10.add('dropdownlist',undefined,nums);
        win.g10.dl1.selection=0;
        win.g15 =win.p1.add('group');
        win.g15.orientation = "row";
        win.g15.alignment='fill';
        win.g15.cb1 = win.g15.add('checkbox',undefined,'Reverse layer order');
        win.g15.cb2 = win.g15.add('checkbox',undefined,'Rename Sublayers Only');
        win.g100 =win.p1.add('group');
        win.g100.orientation = "row";
        win.g100.alignment='center';
        win.g100.spacing=10;
        win.g100.bu1 = win.g100.add('button',undefined,'Rename');
        win.g100.bu1.preferredSize=[120,30];
        win.g100.bu2 = win.g100.add('button',undefined,'Cancel');
        win.g100.bu2.preferredSize=[120,30];
        win.g100.bu1.onClick=function(){
            if(win.g5.et1.text == ''){
                alert("No layer name has been entered!");
                return;
            }
            win.close(0);
    
            var sublayersOnly = win.g15.cb2.value;
            var visibleLayers = [];
            getVisibleLayers (app.activeDocument, visibleLayers, sublayersOnly);
    
            if(win.g15.cb1.value) visibleLayers.reverse();
    
            for(b=0; b		   
  • Sharing of Scripts for pattern recognition

    Hi all

    I need to use the same script for .sdp projects.

    Anyone know how we could do it?

    Thanks in advance!

    It's a called Winwrap basic form, he has his own website https://www.winwrap.com/web2/doc-basic/ which is a useful reference.  MS COM has long been replaced by .NET but of Windows COM objects can be created using Visual Basic or C++ - there's probably a way to use .NET and assemblies, I simply never need a functiont complex enough to require an object. You are showing the references, they are listed in the registry of Windows OCX/DLL objects. Suppose you want to do a database search you would add the ADO MS Library and you can then create connection and recordset objects in the script and access to a database.

    It would be useful to know what's on your WFR project because the AP has a huge layer of script development located above the capabilities of the base product. If you use an AP project, it is wiser to change except the prescribed manner and the code is secured by password, so you can not access it. If you are lost at this level of knowledge then you will find configuration and the use of the BDUS a 3D maze, better get help from companies that specialize in the JAR

  • Script for "fill with pattern" - "use a last used.

    Hello guys, I need a bit of help to automate my work.

    I work with patterns (such as a Model Designer), but I need to automate my work a little.

    There's this great function now 'fill with... model' and then you have scripts for those.

    That said what I usually do, it of that I'm working on a few models, proceed to the design then their test on a file empty large format.

    so

    1. I do my drawing, then

    2. click on "set as a new ground" then

    3. I opened a new charge fbig large file and

    4. use "fill... with reason" and

    5. Select the last one, I created...

    Then I tried to create an action / script so I can you know, batch job, having to decide which of the grounds are good on large format later.

    AND HERE IS THE BUG!

    When I added exactly the same steps in the macro in action - it will work for the first file, but for the second, it will always use the same model used previously, as stocks macro sees it as "fill with pattern XXX" (i.e., not as "last used"), so I land upward with all the photos in large format filled with the same model instead of different.

    I thought then modify the macro so when I g oto step 4

    4. use "fill... with reason" and

    Add "use script" among loading scripts, which would have set something like 'use the last defined pattern' - can be both a code like "use the newer model defined" or "new model added to the batch.

    I understand the logic, but I have no idea how to do to modify the scripts in this area.

    This will save me hours of work, for all your help will be most appreciated.

    Here is a link for the jsx file...

    ExpireBox

  • This handy subtitles AE script for Mac works on PC?

    Hello

    Here is also after effects script, I used on the Mac for a while now (credits in header information), it generates subtitles to layer markers using a text file. It's great to burn in your subs and you do not have to enter timecode, just hit * where you want the line to appear/disappear. I hope you find it useful. My hidden agenda for the display is however if javascript there assistants can identify how to run on a pc (I searched for the original script for some time). Thanks in advance

    {

    Subtitle generator by! Rocky

    / / change by Colin Harman ( http://colinharman.com/ ) to work on a Mac

    //

    Save this code as

    'subtitles.jsx '.

    //

    Create a text file with your subtitles.

    Each line of text is the on-screen line.

    To have several lines on the screen at the same time

    just separated by the vertical bar (|) character.

    for example ' character talks 1 | 2 breaks in character.

    //

    Create a new layer of text in your publication, adjust its position.

    Make sure the centered text, so it's very nice

    Add markers (Numpad *) where each subtitle line should be shown/hidden.

    Run the script with the selected text layer, and select the subtitle file.

    Enjoy!

    function makeSubs() {}

    var layer = app.project.activeItem.selectedLayers [0];

    If (layer.property ("sourceText")! = null) {}

    file text var = File.openDialog ("Select a text file to be opened.", "");

    If (text! = null) {}

    var textLines = new Array();

    textFile.open ("r", "TEXT", "?");

    While (! textFile.eof)

    textLines [textLines.length] = textFile.readln ();

    textFile.close ();

    sourceText var = layer.property ("sourceText");

    var markers = layer.property ("marker");

    for (var i = sourceText.numKeys; i > = 1; i--)

    sourceText.removeKey (i);

    var line = 0;

    Subtext subTime, var;

    for (var i = 1; i < = markers.numKeys; i ++) {}

    subTime = markers.keyTime (i);

    sourceText.setValueAtTime (0, "");

    If ((i % 2) == 0) {}

    Subtext = "";

    }

    else {}

    Subtext textLines [line] = replace ("|", "\x0d\x0a");

    line ++;

    }

    sourceText.setValueAtTime (TextDocument (subText)) subTime, new;

    }

    }

    }

    }

    makeSubs();

    }

    I think that Mac have a sequence of different transport control. Try replacing this line:

    Subtext textLines [line] = replace ("|", "\x0d\x0a");

    with the more generic:

    Subtext textLines [line] = replace ("|", "\r");

    Dan

  • How to run a script for all the images in a folder?

    How to run a script for all the images in a folder?

    You can assign your script to an action, then use processor by batch or image with the option apply to all subfolders.

  • Script for the conversion of the hyperlinks to the buttons?

    Hello!

    Does anyone know if West a script for the conversion of the hyperlinks to buttons with the action of going to the URL with the same URL, which has been used with hyperlink?

    Here it is:

    /* Copyright 2012, Kasyan Servetsky
    November 29, 2012
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Convert hyperlinks to buttons - 1.0";
    
    Main();
    
    //===================================== FUNCTIONS  ======================================
    function Main() {
        var hyperlink, source, sourceText, destination, page, arr, outlinedText, gb, button, behavior,
        barodeCount = 0,
        hypCount = 0;
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        var startTime = new Date();
    
        var doc = app.activeDocument;
        var layer = doc.layers.item("Buttons");
        var swatch = doc.swatches.item("RGB Yellow");
        var hyperlinks = doc.hyperlinks;
    
        var progressWin = new Window ("window", scriptName);
        progressBar = progressWin.add ("progressbar", undefined, 0, undefined);
        progressBar.preferredSize.width = 450;
        progressTxt = progressWin.add("statictext", undefined,  "Starting processing hyperlinks");
        progressTxt.preferredSize.width = 400;
        progressTxt.preferredSize.height = 30;
        progressTxt.alignment = "left";
        progressBar.maxvalue = hyperlinks.length;
        progressWin.show();
    
        for (var i = hyperlinks.length-1; i >= 0; i--) {
            hyperlink = hyperlinks[i];
            source = hyperlink.source;
            sourceText = source.sourceText;
            destination = hyperlink.destination;
            page = sourceText.parentTextFrames[0].parentPage;
    
            barodeCount++;
            progressBar.value = barodeCount;
            progressTxt.text = "Processing hyperlink " + hyperlink.name + " (Page - " + page.name + ")";
    
            arr = sourceText.createOutlines(false);
            outlinedText = arr[0];
            gb = outlinedText.geometricBounds;
            outlinedText.remove();
    
            button = page.buttons.add(layer, {geometricBounds: gb, name: hyperlink.name});
            button.fillColor = swatch;
            button.fillTint = 50;
            button.groups[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
            behavior = button.gotoURLBehaviors.add();
            behavior.url = destination.destinationURL;
    
            hyperlink.remove();
            source.remove();
    
            hypCount++;
        }
    
        var endTime = new Date();
        var duration = GetDuration(startTime, endTime);
        progressWin.close();
    
        alert("Finished. " + hypCount + " hyperlinks were convertted to buttons.\n(time elapsed: " + duration + ")", scriptName);
    
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function GetDuration(startTime, endTime) {
        var str;
        var duration = (endTime - startTime)/1000;
        duration = Math.round(duration);
        if (duration >= 60) {
            var minutes = Math.floor(duration/60);
            var seconds = duration - (minutes * 60);
            str = minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            if (minutes >= 60) {
                var hours = Math.floor(minutes/60);
                minutes = minutes - (hours * 60);
                str = hours + ((hours != 1) ? " hours, " : " hour, ") + minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            }
        }
        else {
            str = duration + ((duration != 1) ? " seconds" : " second");
        }
    
        return str;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    
  • There are Scripts for Premiere Pro

    Hi all

    Are there any Scripts for Premiere Pro as there are Scripts for AE.

    If so, is there a Script that will add handles defined by the user at the end of the clips that are sent to AE via Dynamic Link.

    OR is there a Script in AE will add handles to the imported clips in Premiere Pro.

    I had the situation to do a rough edit and apply transitions between adjacent clips and by selecting the item and choose "New Composition AE doing" only to have the new model AE trucate actly like in the clip is dug in Pre Pro track and executives who were part of the driveway transition.

    Thank you

    I agree with Jim

    I did a few tests and all the clip extensions that add you in AEFX do not reflect agency it is. you receive all the handles!

    Seems that you need to make your extension in the BODY (on a separate layer if necessary), and then use the DL model as an asset

  • Mode script for ANY c ++ function

    Hi all

    My goal was to use the pxi 5406 to implement features of frequency sweep. Right now, we use only the functions on the list of the frequencies of creation. There are four modes of release for the frequency list, signle, continuous, step by step and burst. We use the bleachers through fashion. It is painful to use this mode, since for each frequency, you need to send a rising edge, so if I have several hundred, it means I have to produce this amount of rising edges. This will generate a lot of buffer in another analog card.

    My question is, could I use script for the frequency list view? Or is there a smart way to achieve this? From the file of signal aid, he said that there are some c programe on script mode. But I can't find any examples in my computer. If you have any other, could you send me?

    Thank you very much.
    .

    Yami.

    Yami,

    The 5406 has the ability to run script mode. Only for her output modes are Standard function and frequency list. However, I believe that you can do what you want to do with the list mode frequencies. Assuming that you do not want to trigger you can put the camera in single or continuous Mode. Single will play your select frequency scan and then once completed, build:

    Continuous is similar, but you continue to repeat the signals to stop:

    All the above details are in aid of signal generators of NOR. I looked under the heading devices > 5406 > trigger > triggering Modes.

    With simple or continuous, you can specify the length of the waveform step, which could be a good starting point. With regard to the examples for c ++, I do not have, but if you look in the Start Menu, NOR-FGEN, National Instruments, examples, OR-FGEN C examples you can find a folder for "Sweep generator", there is a model and an example C you can look over your program after. I hope this helps!

  • How to make the new messages show up on Windows mail? columns for messages sent and deleted without long appears. How to make a comeback?

    Original title: Messages a suddenly begin to appear new downstairs; How can I make them appear at the top?  In addition, the columns for messages sent and deleted no long appears.  How to make a comeback?

    It's the Windows Mail 06 comes with Vista.

    Hello

    Step 1:

    Follow these steps and check if that helps.

    (a) open Windows Mail.

    (b) click on view

    (c) select sort by , click on to.

    Do you view recent messages on top.

    Step 2:

    (a) in Windows Mail.

    (b) click on view

    (c) select Layout.

    (d) under the basic click toolbar. (To display the toolbar if it disappears).

    (e) click on customize the toolbar and add Send/recv current toolbar features.

    See also:

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    Hope this helps,

  • Scripts for data cleansing Perf

    Hello

    We currently use BB 4.4 with the new features enabled PERF. Someone at - it scripts for cleaning or truncate the Perf Data collected? 4.5 is supposed to have the function programmed in. We run the BB server on unix.

    Perf Data under the $BBHOME / bbvar / perf

    The files are in plain text with lines like this:

    Here is a not so elegant way to truncate your files in perl. You will need to set the time as a unix timestamp.

    #Purge $BBPERF
    @files = "grep - Rl. $BBPERF / *';"

    $file (@files) {} foreach
    chomp ($file);
    Print "$file\n";
    @data ='cat $file | AWK ' {if (\$4 > = $startTime) {print \$0}} ";
    If (!) () open (FILE, "> $file"))) {print "cannot open $file: $!"} \n » ; print LOGFILE "cannot open $file: $! \n » ; next ;}
    foreach $line (@data) {print FILE $line ;}
    Close the FILE;
    }

  • Removal of Windows Media Player "Library" entries for files that I deleted

    I deleted a bunch of files of music from my computer (directly in Windows Explorer), but registration for the music files deleted still appear in my Windows Media Player "library".  I tried to right click and select 'Delete', but it does NOTHING.

    Any ideas how I get rid of these old entries. I hope I don't have to uninstall and reinstall Windows Media Player!

    SHE FOUND!

    If you have a large number of entries in doubles in your library (or if your library is duplicated), it might be better to create a new library.

    Method 1: To resolve this problem, clear the Windows Media Player database. To do this, follow these steps:

    1. exit Windows Media Player.

    2. for Windows 7: click Start, run, %LOCALAPPDATA%\Microsoft\Media Player and then click on OK.

    3. Select all the files in the folder, and then click delete on the file menu.

    Note you don't have to remove the folders that are in this folder.

    4. restart Windows Media Player.

    Note Windows Media Player automatically rebuilds the database.

  • I want to reset all the gpo admin, security settings, etc. by default setting. Is there a script file, treatment by batch or reg I can access?

    I want to reset all the gpo admin, security settings, etc. by default setting. Is there a script file, treatment by batch or reg I can access?

    Hello

    I suggest you to send your query in the TechNet Forums to get help.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    It will be useful.

  • How to write a script for date get to the Clipboard

    Hi experts,

    How to write a script for date get to the Clipboard.

    the date format will be like this:

    05 - may

    respect of

    John

    Thanks guys, thanks Sanon

    I finally use the .bat doc

    like this:

    @@echo off
    for /f "delims =" % in (' wmic OS Get localdatetime ^ | find ".") "") Set "dt = %% a"
    the value "YYYY = % dt: ~ 0, 4%.
    the value "MM = % dt: ~ 4, 2%.

    If MM % is 01 set MM = January
    If % MM == 02 set MM = February
    If MM % is MM value = March 03
    If MM % is 04 MM value = April
    If MM % is 05 MM value = may
    If MM % is 06 MM value = June
    If MM % == 07 set MM = July
    If MM % is MM value = August 08
    If MM % is MM value = September 09
    If MM % is 10 MM value = October
    If MM % is 11A set MM = November
    If MM % is game MM 12 = December

    the value "DD = % dt: ~ 6, 2%.
    the value "HH = % dt: ~ 8, 2%.
    the value "Min = % dt: ~ 10, 2%.
    Set "s = % dt: ~ 12, 2%.

    Echo DD - MM HH % %% % Min | Clip

    It works

    respect of

    John

  • For Clips .mp2 batch conversion

    I just found out that video for .mp2 support was discontinued in PE13.   I have several directories of archived video clips .mp2 (and associated .wav files).  Is there a way to batch convert PE10 (I have and you can reinstall) or otherwise, any recommended programs for the conversion batch of good quality?

    Thank you very much

    Bruce

    No batch conversion with elements.

    HandBrake is a free and very good converter.

Maybe you are looking for

  • Satellite P100-646 - goes down by itself

    Hi all, I have some problems of temperature serious with my * Toshiba Satellite P100-646 * (T5200 @ 1.6 Ghz). The CPU seems very hot and the fan works very often.HWMonitor tools report a temperature never sub * 75 * ° C and can be up to * 98 * ° C. T

  • HAVE DAQmx error-200279

    I run a loop with a N-Chan AI read vi, out its values in a queue which is read by the other parallel loops.  During the operation of the program, when the other loops treat their queues and (from what I can tell) occupy time processor, read it loop r

  • HP M6-w103dx: Best Buy Exclusive model HDD SSD

    Hello. Best Buy is running a Black Friday deal on a computer laptop touchscreen HP 2 in 1. Model # laptop as described on the website of Best Buy's "M6-W103DX. This exact model seems to appear when I search on the HP website. The laptop comes with a

  • BlackBerry Smartphones lock the keyboard

    Hello I bought a used 9930 and the keyboard is locked and can not reach the seller... How can I unlock it? Thank you very much!

  • Printer gets the stop after the reboot of the machine.

    I use windows 7 with a range of HP lj printers 1008. When I'm picking up my printer to computer not giving the impression but printer is in ready mode. If I restart the Printer Spooler service is working. otherwise it's not take impressions of applic