Fill array with file names

What am I missing?  I've got alerts that should pop up if it works and if it fails but instead it does nothing, I'm sure its possible to create an array that is made up of all the file names of a folder.  In the past I've had to enter all the values one a time and some of these folders have 200+ files in it.
#target illustrator
filltotesTempArr
function filltotesTempArr()
var toteTemparray = new Array(toteTemps)
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var allFiles = artPath.getFiles(order);
var toteTemps
if (allFiles.length > 0)
    for (i=0;i<allFiles.length;i++)
            toteTemps = toteTemps + app.open(allFiles[i] )
          }//end for
      alert("Your array has the current values:" + toteTemps);
    }//end if
    else
    alert("Script to fill Totes Templates Array has failed");

I need to take all the files inside of a folder, and put their file names in an array like this;
var totesarr1= new Array ("A165331","A165332","A165333","A165334","A165337","A165338","A165344","A165348", "A165349",
"A165352","A165353","A203","A210","A211","A214","A222","A229","A231","A232","A234","A248","A250","A252","A268",
"A271","A272","A278","A290","A292","A322","A323","A324","A325","A327","A330","A402","A404","A405","A407","A408",
"A409","A410","A411","A414","A415","A417","A420","A422","A423","A424","A425","A427","A430","A436","A438","A439",
"A440","A441","A443","A446","A448","A449","A450","A451","A452","A454","A455","A456","A460","A461","A468","A470",
"A490","A495","A497","A500","A508","A509","A510","A512","A513","A514","A518","A524","A525","A526","A527","A530",
"A533","A534","A536","A543","A581","A582","A587","A602","A619","A624","A705","A707","A710","A714","A715","A739",
"A740","A741","A742","A743","A744","A745","A748","A750","A751","A752","A753","A754","A755","A756","A763","A800",
"A801","A804","A806","A811","A815","A817","A818","A819","A824","A832","A835","A836","A838","A841","A844","A848",
"A849","A852","A854","A856","A857","A859","A861","A863","A865","A866","A868","A871","A873","A877","A879","A881",
"A885","A888","A890","A894","A899","A900","A902","A904","A940","A941","A943","A944","A945","A948","A97307","A97309",
"A97313","A97314","A97315","A97316","A97321","A97326","A97340","A97342","A97708","A97715","F742","F751","V6432");
so the closest thing that I can come up with is this;
#target illustrator
filltotesTempArr
function filltotesTempArr()
var toteTemparray = new Array(toteTemps)
var order = new RegExp(input);
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var totetempnames = toteTempPath.getFiles();
var totetemps = new Array ()
var allFiles = toteTempPath.getFiles();
if (allFiles.length > 0)
    for (i=0;i<allFiles.length;i++)
            toteTemps = toteTemps + "," + app.open(allFiles[i])
          }//end for
      alert("Your array has the current values:" + toteTemps);
    }//end if
    else
    alert("Script to fill Totes Templates Array has failed");
alert ("Script is Done")
but even this dosn't work like it should
#target Illustrator
GetTempNames;
function GetTempNames ()
var toteTempPath = Folder ("S:/Illustrator JS Palette/Direct Template Calls/Totes");
var toteTempNames = toteTempPath.getFiles()
var totetemparr = new Array ( toteTempNames )
alert ("script is done get ready");
    alert ("Here " + totetemparr);
so now I'm at a loss

Similar Messages

  • How to get multiple image resoultion and paste it in new ms word doc or ecxel with file name

    Hi any one help me to get the imge resolution and paste it in new ms word or excel
    i have 100 file i fixed the sizing for all the file by downsample using javascript
    i want to get the resolution of all the image and paste it with file name
    anyone please help me
    Thank you

    Hi any one help me to get the imge resolution and paste it in new ms word or excel
    i have 100 file i fixed the sizing for all the file by downsample using javascript
    i want to get the resolution of all the image and paste it with file name
    anyone please help me
    Thank you

  • Received File send with file name to destination side

    Hi All,
    Here I have used FILE adapter in Receive location and WCF-BasicHttp adapter in send ports.
    Requirment is should be able to send the file name also along
    with the file to destination from BizTalk.
    No orchestrations in this project. DynamicSendPassThru sendport. Please find the below screenshot for send port properties.
    How can i fix this please assist me on this.
    Thanks & Regards,
    Vasu

     Hi Osman,
    below code is custom pipeline code. and what code and where can i add the code.
    regarding send the file with file name from BizTalk to OutBound transport location.
    Please assist me on this.I'm not aware coding part. 
    publicMicrosoft.BizTalk.Message.Interop.IBaseMessageExecute(Microsoft.BizTalk.Component.Interop.IPipelineContextpc,
    Microsoft.BizTalk.Message.Interop.IBaseMessageinmsg)
                System.Diagnostics.
    Debug.WriteLine("Inside
    SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    IBaseMessageContextmessageContext = inmsg.Context;
    // if the transport type is file for outbound, then change the add in the date in the file name.
    stringadapterType = (string)inmsg.Context.Read("OutboundTransportType",
    "http://schemas.microsoft.com/BizTalk/2003/system-properties");
    // The file name in the file adapter must contain '%SourceFileName%', e.g. CB_%SourceFileName%.xml
    if(adapterType ==
    "FILE")
    // Retreive the file name from the message context
    //object obj = messageContext.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    //string customSendFileName = obj.ToString();
    //System.Diagnostics.Debug.WriteLine("FileName:" + customSendFileName, "SLNG.BizTalk");
    // Append with date in ddMMyyyy_HHmmss format
    stringcustomSendFileName =
    if(string.IsNullOrEmpty(DateFormat))
                        customSendFileName =
    DateTime.Now.ToString("yyyyMMdd_HHmmss");
    else
                        customSendFileName =
    DateTime.Now.ToString(DateFormat);
                    System.Diagnostics.
    Debug.WriteLine("FileName:"+
    customSendFileName, "SLNG.BizTalk");
    // Write back with new file name to the message context
                    messageContext.Write(
    "ReceivedFileName",
    "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //if (messageContext.IsPromoted("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties")
    == false)
    //    messageContext.Promote("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties",
    customSendFileName);
    //messageContext.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", customSendFileName);
                System.Diagnostics.
    Debug.WriteLine("Going
    off SendFileRenameWithDate Pipeline",
    "SLNG.BizTalk");
    returninmsg;
            #endregion
    Thanks & Regards,
    Vasu

  • How to print contact sheet with file names

    I want to print a photo contact sheet with file names. Is this possible with any standard Mac app?

    I'd like to print the Album name at the top of each contact sheet I produce from that album - is this possible within iphoto '08 or do I need to print to a pdf and then edit that pdf with acrobat pro for example.

  • How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • LabVIEW 2011 file selection fails to fill in the file name into the "File name:" field

    In LV2011 I am selecting a text file while my code is running. The "file name:" field is not populated with the selected file name.
    This is inconvenient, especially if I want to modify a file name by one or some few characters.
    How do i make LV 2011 behave like the previous versions?
    Scientia est potentia!
    Attachments:
    File name is not filled in.PNG ‏72 KB

    Thank you fot your reply it causd  me to find the problem.
    I figured it out while I was trying to extract the applicable section of my code to send it to you.
    I had an asterisc wired to the "default name" input of the "File dialog" VI.
    Now I am not wiring anything to the "default name" input of the "File dialog" VI and it works just fine.
    I am sorry for your lost time.
    Scientia est potentia!
    Attachments:
    Corrected code.PNG ‏10 KB

  • Automatically populate metadata field with file name?

    Hi, I'm not sure if this is possible...
    I'm working with many large batches of .jpg files, and am running them through Bridge in order to add metadata according to my client's guidelines.
    For every single file, my client requires that the "Description" field in the IPTC Core section of the metadata is filled with the full filename, as it would appear in the Finder, including the .jpg extension.
    Currently I'm copying every file's name and pasting it into the Description field. Does anyone know of a good way to automate this task? Since each file name is different, a standard metadata template isn't meeting my needs.
    If anyone knows of a good way, I'd be very glad to know! Thank you.
    Chad
    Adobe Bridge CC 6.0.1.6  /  Mac OS X 10.9.1

    Awesome, That works really well.
    I found this on the forum based on your answer.
    Puts the file name in the field and takes off the .pdf extention.
    var
    fileName = event.target.documentFileName;
    //removing the file extensionvar vDot = fileName.length-4;
    //apply the value to the TxtFieldthis.rawValue= fileName.substring(0,vDot);

  • Importing text file (with file names) into Automator.. is it possible?

    Hello all,
    I have been working with Windows Batch files for my line of work. I have a couple of file names in a text file (a column), which I want to copy from one folder of one hdd to another folder on a different hdd. I have been trying to do this kind of work with a Mac. I already know how you copy and rename files in automator (which isn't difficult, of course) but you have to 'select' the files in the finder first (with get specified items).
    But the only way i see that you can specify items is by selecting them... is there a way to import a text file with all the file names instead of selecting all the file names manually?
    or is there an AppleScript alternative which I can use to import the text file (or just copy into applescript) and run before the query's of copying and renaming the files? I am kind of new to Apple programming.
    The text file looks like this:
    image1.jpg
    image2.jpg
    etc..
    so there has to be a command to: 'goto' a specific folder as well.
    Thanks in advance!

    You can import text files, but if they are just names you will need an additional action to add the source folder path. A *Run AppleScript* action can be used, for example:
    Tested workflow:
    1) *Ask for Finder Items* {Type: files } -- choose the text file containing the names
    2) *Combine Text Files* -- this gets the text file contents
    3) *Filter Paragraphs* { return paragraphs that are not empty } -- skip blank lines
    4) *Run AppleScript* -- copy and paste the following script:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 680; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- add folder path
    add the specified folder path to a list of file names
    input: a list of text items (the file names)
    output: a list of file paths (aliases)
    set output to {}
    set SkippedItems to {} -- this will be a list of skipped items (errors)
    set SourceFolder to (choose folder with prompt "Choose the folder containing the file names") as text -- this is the folder containing the names
    repeat with AnItem in the input -- step through each name in the input
    try
    set AnItem to SourceFolder & AnItem -- add the prefix
    set the end of the output to (AnItem as alias) -- test
    on error number ErrorNumber -- oops
    set ErrorNumber to ("  (" & ErrorNumber as text) & ")" -- add the specific error number
    set the end of SkippedItems to (AnItem as text) & ErrorNumber
    end try
    end repeat
    ShowSkippedAlert for SkippedItems
    return the output -- pass the result(s) to the next action
    end run
    to ShowSkippedAlert for SkippedItems
    show an alert dialog for any items skipped, with the option to cancel the workflow
    parameters - SkippedItems [list]: the items skipped
    returns nothing
    if SkippedItems is not {} then
    set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
    if TheCount is greater than 1 then
    set theMessage to (TheCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 " & " item was skipped:"
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
    if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
    alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end ShowSkippedAlert
    </pre>
    5) *Copy Finder Items* { To: _your external drive_ }

  • How to allow user to select pdf file on local machine and populate field with file name only

    Folks,
    I have a project requirement that I am stumped on.  I am admittedly a novice, so forgive questions that may seem obvious.
    My requirement is a form running on a client system where the user can click a button and select a PDF file name from a PDF on their local machine and then populate a form field with that file path & filename.  The file names vary between all machines, so there is no static list.  Note that the PDF is not embedded, nothing is executed, I simply need the file name.
    There are several of these on a form (20+), so manual name entry is too error prone.   I would like to use a 'browse' type dialog, but can not figure out how to implement it.
    I've looked at app.browseForFile, but the users can not install a javascript file in their adobe folder or any other files;  the functionality has to be integral with the original PDF. 
    Functionally, this is no different from the image object file browse, except that I need a PDF instead of an image file, so there doesn't seem like there should be a security issue that is any different from those surrounding the image object.
    I've been stumped on this for the entire week, and I have a deadline rapidly approaching, so any examples or suggestions (please remember I'm a novice) would be greatly appreciated! 

    Thanks for the reply Paul - do you have any sample code of how to attach the PDF?  Or how the user can select a PDF to open?  I might be able to attach it, retrieve the file name, and then un-attach it.
    Alternatively, do you know how to retrieve the file name from the imagePath object?  It will let you select PDF files, but I can't find info on how to retrieve the file name.   It should be the way you would retrieve the file name for an image.
    As a novice in this, thanks for your help and patience!

  • Batch Printing with File Names in Photoshop CS5

    How can I batch print hundreds of images with the file name on each of the print? I also need them to be printed at their original dimensions, which mean they should not be scaled when printed to papers.  Any help would be greatly appreciated. Thanks.

    Thanks for your response, Noel. However, the images to be printed at their actual dimensions and resolution (300ppi). This is so that we can see how their qualities are going to be when they are printed the actual publication, which is at 300ppi.
    What I used to be able to do in CS3 is creating an action in Photoshop that contains a print command with "label" or file name option on. Then I ran the script through the batch command in Bridge. However, in CS5, when I tried to same method, all of the images are printed at 1/2 an inch while they are actually 3-5 inches at 300ppi. Therefore, I am trying to another method that would give me the same result.

  • How to import MP3 with file name into library, rather than tag?

    I've been given a CD with about 200 MP3s of lectures. They are to be listened to in order, and the file names reflect the order number, like "lecture 1", "lecture 2", etc. However, when I drag them all into iTunes, the names in the iTunes library don't include the file names - they are simply "lecture", which I guess must come from a tag in the MP3 file. So iTunes is ignoring the file name and thus I end up with 200 entries in my iTunes library that can't be ordered properly. How can I get it to use the file name when importing?
    Mike

    If you have your iTunes preferences set to keep your iTunes Music folder organized, it's possible that even the file names have changed according to the files' tags. In that case, you'll need to (at least temporarily) disable this option and import the files from your CD again.
    Once you're sure the files have been successfully added to your iTunes library and the file names kept intact, you can use the Filenames to Song Names script from Doug's AppleScripts for iTunes.
    This should get everything sorted out.

  • Problem with file name r�servation.txt

    I am facing a strange problem. I have a file named r�servation.txt. File.isFile() method returns true for this file on Windows, but on linux it returns false. I am using SUSE Linux 10 version. As you can see, there is an extended character (�) in the file name which causes the issue.
    Could anyone please help resolving the problem?

    Rename the file? IMHO, filenames with special characters and white spaces and all that are nothing but a nuisance, but that's just my opinion...

  • Issue with file name in receiver Communication channel

    Hi Experts,
      I am sending the files from SAP Application server to third party Application server.
    In my source folder i have different types of files with different names.
    but i need to pickup the files which is coming as of type sss_3300_was.txt and sss_3400_was.txt.
    what would be the logic for this.what my understanding is if i put sss_* it will works.
    If suppose the file is Exist in the folder as sss_3300_was.txt , so it will picked up and places in target folder.
    and next time if the file type is sss_3400_was.txt then that will pick up and places in the target folder.
    my question is, in the receiver comm channel what would be the file name scheme. i have tried with * and / but system has not been accepted as * can not be given.
    Kindly suggest what should i put in Receiver CommChanne file name sheme.
    Appreciate your inputs
    Thanks,
    Bhaskar

    Hi Satish,
    Thanks for your valuable inputs.
    Actually i need to change the subjet when i am asking other question...
    first thing is suppose i have 10 files like sss_3100_was, sss_3300_was, sss_3400_was........sss_3900_was  in the sender application folder and should be moved to receiver [target] folder with the same name.
    as you said mentioned above below is my undertsanding, please correct me if i am wrong.
    In sender cc
    1.  i will give file name as sss_*
    2. i will flag ASMA and also check file name.
    In receiver cc
    1. I will give file name as sss_*
    2. i will flag ASMA and also check the file name
    The above is my understanding with respect to your inputs,  is it correct?
    in receiver cc i have tried file name scheme as sss_*  but when i see the receiver CC log its telling that * is not allowed.
    may be i have not flaged ASMA at that time, but now i will flag ASMA in receiver CC dose it works? just need to confirm from you.
    Regarding seconf issue.
    when file is picking up from the source folder from SAP Application server as i can see file is picking up well and posting in third party folder and even in the sender cc and receiver cc logs i could see all shown in success.But when i see in the SXMB_MONI in the inbound interface the data are coming in the special charater format like @$??? and so on.But when i checked in SAP Appl server the same file contains the three lines of data like material number purchase order number and so on and it is Text file.
    below mentioned are done configs for sender CC by me.
    MP: file
    TP: NFS [as  it is SAP appl server]
    filepath:/
    file name: sss_*
    file type :text
                   add time stamp
                   ..... and so on
    Kindly advise me if any changes are required and also provide me inputs in case any correction.
    Thanks,
    Bhaskar Reddy

  • Export Artboards with file name = to artboard name

    My job requires me to deal with multiple artboards in a single file (same project versioned out among several clients). Is there any way to export from Illustrator where the exported file's name would match the name of the artboard rather than documentName-01, documentName-02 and so on?
    Note: I am working with CS5

    You can rename the artboards there.
    The name gets part of the file name on export.

  • Printing my PDF with File name and Tags Stamped on

    To Forum,
    Possibly not a completely Apple related query, but if anyone know it would be great.
    id like to print a PDF on my MBP with the File name and Tags applied to it stamped on the paper copy... or come to think of it, stamped on the PDF copy which i then print out with those stamps on. Either way will do. Any ideas? Its not immediately obvious when i look at the Printing Prefs box.

    This is an option built into various apps - Safari, Firefox, Microsoft Office.
    There are "PDF Utils" that do this on PDFs one at a time. Can't find a specific one for Macs, but found 2 for Windows.

Maybe you are looking for

  • CATS_DA and CADO different column fields

    Hy friends, i have problem with CATS_DA when i log on in different language in system. I create z field in CATSDB - zccode. When i create report in English version everything is fine - field zccode show results. When i logon in Bulgarian language in

  • Graphical Business Blueprinting : Technical Requirements and Setup

    Dear All, I am trying to use the Graphical Business Blueprint in Solution Manager 7.1 I followed the following steps in a bid to complete the product technical setup. Installed the So-Co Add on using SAINT transaction. No special steps, just normal a

  • Kernal Upgrade

    Dear All Can anyone please tell me what Other location we can put the kernal file while upgrading the kernal apart from usr\sap\sys\exe?? Regards, Manmohan

  • Selection in Info set characters.

    Hi, I have a report based on an info set which has a selection based on contact person. There are many entries for contact person, but I want to show only those which are in the DSO. Is this is possible? There is a setting in info object BEx tab for

  • Inline edit   of Oracle UCM content  in weblogic portal

    Hi, I am using weblogic portal with oracle UCM repository.I just want to edit UCM content inline in porlet. Can any body please suggest on same?