Invoking Composite from BPMN with file read operation

hello,
I have a composite which does a simple file read and dumps data to database using mediator.
right now composite gets kicked off by presence of a file in a directory.
I would like to invoke this composite from a BPMN process, unfortunately because of nature of file adapter created through composite, jdeveloper doesn't expose the FileAdapter read operation as WSDL so I cannot create a service task out of it.
How can I invoke composite directly without having to create a file adapter at the BPMN level and take care of transforming the records to DB adapter?
thanks.

As you guess, it is stored in the PSD, but only with the Maximise Compatibility switch. Without that switch, a dummy image is stored which has the text "This layered Photoshop file was not saved with a composite image.", in English, German, Japanese and French.
My program
psdparse extracts each layer in an 8-bit file as a PNG, and the merged image for both 8- and 16-bit files. That link is to a Subversion repository containing source code.

Similar Messages

  • How to read the 'full resolution composite' from a .psd file?

    I'm working with 16-bit .psd files and have the "maximize compatibility" switch turned on in CS2. When a file is saved, a message box appears indicating that PS is generating a "full resolution composite." I'd guess this is stored in the .psd file somehow, because some of the 3rd party image viewers are able to display the image when the compatibility switch is used, but are unable to display the image otherwise.
    My question is: how can I read this full resolution composite from the .psd file outside of Photoshop?
    If this is the wrong forum to post this question, I'd appreciate it of you'd tell me a better place.
    Thanks,
    Dave H.

    As you guess, it is stored in the PSD, but only with the Maximise Compatibility switch. Without that switch, a dummy image is stored which has the text "This layered Photoshop file was not saved with a composite image.", in English, German, Japanese and French.
    My program
    psdparse extracts each layer in an 8-bit file as a PNG, and the merged image for both 8- and 16-bit files. That link is to a Subversion repository containing source code.

  • How did my pdf files get converted from 'open with Adobe Reader' to open with Adobe Acobat'?  And if I have a ''free'' Acrobat account why does it not open?  When I do click on the account it ask me to pay $89.99.  I never wanted Acrobat.  How can I get -

    How did my stored files get converted from 'open with Adobe READER' to 'open with Adobe ACROBAT'? How can I get them re-set to open with 'Adobe Reader'?
    Please reply to my e-mail:   [email protected]

    It sounds as if you downloaded Adobe Acrobat Pro. If you did, uninstall it. Then repair Adobe Reader.
    The free Acrobat account has no connection to any of this.

  • I cannot open any pdf files from internet with this reader.

    I cannot open any pdf files with this reader, please advise.

    What is your operating system?  What is your browser?  What is your Reader version?  What exactly means "cannot"?

  • Urgent :: 11g Invoking Composite from Java/From Webservice Proxy

    Hi All,
    i have a requirement where in need to when ever the exception occurs it invokes custom java and then it invoked a BPEL process to handle the errror.
    in 10.1.3.4 i used to Java Api to invoke the BPEL process and it works fine.
    1) . now we are migrating to 11g, i know this API wont work with 11g as the server is on weblogic and client librairies may be different for invoking in composite it in 11g. if any body has invoked a composite using java and the using 11g libraries to invoke the composite ? if so can you please post here ?
    2). otherway i tried to create a Web Service proxy using Jdeveloper for the composite, when i test it using Jdeveloper it is working fine, but when i place it in the lib directory, im getting a bad response from server 503.
    please see logs below for the second approch
    Caused by: javax.xml.ws.WebServiceException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:989)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:224)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invokeOneWay(OracleDispatchImpl.java:102)
         at oracle.integration.platform.blocks.soap.AbstractWebServiceBindingComponent.dispatchRequest(AbstractWebServiceBindingComponent.java:447)
         ... 61 more
    Caused by: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call2(HttpSOAPConnection.java:209)
         at oracle.j2ee.ws.common.transport.HttpTransport.transmit(HttpTransport.java:73)
         at oracle.j2ee.ws.common.async.MessageSender.call(MessageSender.java:64)
         at oracle.j2ee.ws.common.async.Transmitter.transmitSync(Transmitter.java:134)
         at oracle.j2ee.ws.common.async.Transmitter.transmit(Transmitter.java:90)
         at oracle.j2ee.ws.common.async.RequestorImpl.transmit(RequestorImpl.java:273)
         at oracle.j2ee.ws.common.async.RequestorImpl.invokeOneWay(RequestorImpl.java:169)
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:985)
         ... 64 more
    Caused by: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.processHttpResponseCode(HttpSOAPConnection.java:603)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.post2(HttpSOAPConnection.java:469)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:1203)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call2(HttpSOAPConnection.java:207)
         ... 71 more
    if any body has already implemented the invocation of composite in one of above approaches, please let me know.
    any pointers to resolve this will be of great help
    Thanks
    Nadh

    Here is sample to invoke a composite from JSP, this should be same from Java Class. Note that the composite should use adf binding and not ws binding.
    Here is snippet of composite.xml service:
    <service name="rmibpel_client_ep" ui:wsdlLocation="RMIBPEL.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/Application1/RmiVsSOAP/RMIBPEL#wsdl.interface(RMIBPEL)"/>
    <binding.adf serviceName="rmibpel_client" registryName=""/> </service>
    Note the binding should be binding.adf and not binding.ws
    Sample jsp:
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.Map" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="oracle.soa.management.facade.Locator" %>
    <%@page import="oracle.soa.management.facade.LocatorFactory" %>
    <%@page import="oracle.fabric.common.NormalizedMessage" %>
    <%@page import="oracle.soa.management.util.NormalizedMessageImpl" %>
    <%@page import="oracle.soa.management.facade.Composite" %>
    <%@page import="oracle.soa.management.facade.Service" %>
    <html>
    <head>
    <title>Invoke HelloWorld</title>
    </head>
    <body>
    <%
    String msg = request.getParameter("world");
    if(msg == null)
    msg = "World";
    String xml = "<process xmlns=\"http://xmlns.oracle.com/Application1/RmiVsSOAP/RMIBPEL\"><input>" + msg + "</input></process>";
         Hashtable jndiProps = new Hashtable();
         jndiProps.put(Context.PROVIDER_URL,"t3://strec03-1.us.oracle.com:8001/soa-infra");
    jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    jndiProps.put(Context.SECURITY_PRINCIPAL,"weblogic");
    jndiProps.put(Context.SECURITY_CREDENTIALS,"weblogic");
    jndiProps.put("dedicated.connection","true");
    Locator locator = LocatorFactory.createLocator(jndiProps);
         String compositeDN = "default/RmiVsSOAP!1.0";
    Composite composite = locator.lookupComposite(compositeDN);
    String serviceName = "rmibpel_client_ep";
    Service deliveryService = composite.getService(serviceName);
    System.out.println("composite=" + composite);
    System.out.println("deliveryServce=" + deliveryService);
    // construct the normalized message and send to Oracle WLS
    NormalizedMessage nm = new NormalizedMessageImpl();
    nm.getPayload().put("payload", xml );
         NormalizedMessage res = null;
         try {
              res = deliveryService.request("process", nm);
         catch(Exception e)
         e.printStackTrace();
    Map payload = res.getPayload();
    out.println( "BPELProcess HelloWorldService executed!<br>");
    //See below output in log file
    oracle.xml.parser.v2.XMLElement elem =
         (oracle.xml.parser.v2.XMLElement) payload.get("payload");
    elem.print(System.out);
    %>

  • Problem With File Reading And Sorting

    I'm having problems with a particular task. Here is what I have to do:
    Write a program which reads 100 integers from a file. Store these integers
    in an array in the order in whcih they are read. Print them to the screen.
    Sort the integers in place using bubble sort. Print the sorted array to the
    screen. Now implement the sieve of Eratosthenes to place all prime numbers
    in an ArrayList. Print that list to the screen.
    Here is the code I have so far:
    import java.util.ArrayList;
    import java.io.*;
    public class Eratosthenes
        private ArrayList numbers;
        private String inputfile1 = "numbers.txt";
        public Eratosthenes()
            numbers = new ArrayList();
        public void readData()
            try {
                BufferedReader reader = new BufferedReader(new FileReader(inputfile1));
                for(int i = 1; i <= 100; i++) {
                    String temp = reader.readLine();
                    numbers.add();
            catch(Exception e)
    This is the file reading part I have done but it doesn't recognise the line numbers.add() . It brings up the error - 'Cannot resolve symbol - method add(). Thats the first problem I have, can anyone see any way to fix it and to achieve the task. Also can someone help with the structure of a bubble sort method and a sieve of Eratosthenes method as I have no clue whatsoever. Any help will be greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Ok, I've done that but I'm having another problem. When I'm printing an output to the screen, it prints 100 lines of integers and not 1 line of 100 integers. Can you see the problem in the code that is doing this?
    import java.util.ArrayList;
    import java.io.*;
    public class Eratosthenes
        private ArrayList numbers;
        private String inputfile1 = "numbers.txt";
        public Eratosthenes()
            numbers = new ArrayList();
        public void readData()
            try {
                BufferedReader reader = new BufferedReader(new FileReader(inputfile1));
                for(int i = 1; i <= 100; i++) {
                    String temp = reader.readLine();
                    numbers.add(temp);
                    System.out.println(numbers);
            catch(Exception e)
    }

  • Problem launching Firefox from Windows with file path that contains space characters in the html file's file name

    We have a software application that programmatically launches the default web browser using the Windows shell execute function ("ShellExecuteA" in the "shell32.dll" library of the Windows API) along with a file path for a saved local html file that is to be displayed. In the case that FireFox is the default browser and the file path for the html file contains any space characters in the html file's file name, Firefox (in this case v7.01) will display an error message "File not Found..." and then will also proceed to open tabs for each of the individual words in the file name, launching as the URL path, each individual word appended to ".com".
    In the following example, the path "C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm" when launched programmatically, resulted in the error message "File not Found...Firefox can't find the file at /C:/KSSecOfState/Forms/Kansas." and opened up browser windows for "http://www.secretary.com/", "http://www.of.com/", "http://www.state.com/", "http://www.and.com/", and attempted to launch "http://forms.htm". If the same file (renamed) is launched using the path string "C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm" the file opens up correctly in Firefox. Clearly the presence of spaces in the file name is causing the problem.
    I should also note that either path (with or without space characters) works properly if pasted directly into the Firefox URL path menu bar for a live instance of Firefox. The test path strings I used were:
    C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm
    C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm
    Does anyone know anything about this problem or how to work around it (other than the obvious answer of taking the spaces out of the file name which is not possible for this application). It seems the problem is specific to Firefox. IE works properly if launched programmatically with spaces in the file name passed to it. I haven't tested other browsers yet.
    Thanks!

    If starting from ShellExecute works the same as starting from the command line then there are two options:<br>
    Put everything inside double quotes<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''"c:\test\svg test.htm"'''<br>
    Convert to a valid url with file:// protocol and percentage-escaping the space<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''file://c:\test\svg%20test.htm'''<br>

  • Please help with file reading component

    i am currently writing a program in which i need to have a JTable
    which displays data from a text file which can be selected from an
    option via a JList. I can get the info from the file into the JTable
    but for some reason which i can't figure out! the file reading method
    which i have written to read the data in the text file keeps reading the text file twice so i am getting duplicate data in the JTable. it may
    be easier to understand with the code i have supplied for the ListListener and the file reading method. the text file which is to be read contains data in the form - aName%anAddress%aBirthdate%aGender
    here is the code:-
    //class listening for JList selection
    class ListListener implements ListSelectionListener{
              public void valueChanged(ListSelectionEvent e){
    try{
    //send the selected index to file reading method
                   readFile(fileList.getSelectedIndex());
                   catch(IOException exception){
                   JOptionPane.showMessageDialog(
                                  PeopleJTable3.this,
                                  "File not found", "Error",
                                  JOptionPane.ERROR_MESSAGE);
              }//end of valueChanged
    //method to read a file given a specific index
    public void readFile(int fileNumber)throws IOException{
              BufferedReader keyboard = new
                   BufferedReader(new InputStreamReader(System.in));
    PrintWriter screen = new PrintWriter(System.out, true);
    //declare variables to enable separating the data in the file
    String fileName, name, address, birthdate, gender, line;
    int i=0;
    int lineLength,firstPercent,secondPercent, thirdPercent;
    PersonRecord[] group = new PersonRecord[20];
    final char PERCENT = '%';
    if(fileNumber == 0){
    fileName = new String("datafile.txt");
    //create filereader to read a byte stream from a file
    //oparameter has name of file;
    FileReader fr = new FileReader("datafile.txt");
    //create buffered reader object takes stream of characters
    //from filereader
    BufferedReader in = new BufferedReader(fr);
    line = in.readLine();
    // while (line != null){
    while( !line.equals("0")){
              //find second percentage
              firstPercent = line.indexOf(PERCENT);
              int a = firstPercent + 1;
              while(line.charAt(a) != '%'){
                   a++;
    //find third percentage
              secondPercent = a;
              int b = secondPercent + 1;
              while(line.charAt(b) != '%'){
                   b++;
              thirdPercent = b;
              //extract the name
              name = line.substring(0,firstPercent);
              //extract the address
              address = line.substring(firstPercent + 1, secondPercent);
              //extract the D.O.B.
              birthdate = line.substring(secondPercent + 1, thirdPercent);
    //extract overdraft amount;
    gender = line.substring(thirdPercent + 1, line.length());
    String[] tabEntry = {name,address,birthdate,gender};
    //add this row to JTable
    people.addRow(tabEntry);
    line = in.readLine();
    screen.println(i);//this was used to check that the
    //file was actually being read twice
    //from this method
    i++;
         }//end while loop
    in.close();
    }//end readFile
    if you can tell me why this read the file twice that would be fantastic!
    Cheers
    iain

    oh, that is right... the valueChanged() method will get called twice when you use a mouseclick, but if selecting from the keyboard it will only be called once. I'm not sure why it does that either, but what camickr suggested will fix it.
    Here is my substitution using the StringTokenizer..
    // you will need to import the class
    import java.util.StringTokenizer;
    // this will actually read the entire file until EOF
    while( (line = in.readLine()) != null )
         StringTokenizer st = new StringTokenizer( line, "%", false );
         // make sure there are at least 4 tokens in this line to read
         while( st.countTokens() == 4 )
              name = st.nextToken();
              address = st.nextToken();
              birthdate = st.nextToken();
              gender = st.nextToken();
         String[] tabEntry = {name,address,birthdate,gender};
         //add this row to JTable
         people.addRow(tabEntry);
    } //end while loopHere's the link to the StringTokenizer's API http://java.sun.com/j2se/1.3/docs/api/java/util/StringTokenizer.html
    good luck,
    .kim

  • Cannot print from IE11 with adobe reader 9.4.2

    When we open pdf files within IE11 and try and print, the printer properties box becomes unresponsive.
    we need to crash IE to resolve it, but are unable to print.
    we cannot upgrade Adobe Reader as we have another application which doesn't work with anything higher.
    I saw there was a workaround for adobe acrobat, but we need a fix for reader if possible
    changing the setting in adobe to open the pdf in it's own window is not a solution for us either

    No difference in output using the latest version.
    We are printing to Xerox WorkCentre 7425/7435 printers. When printing from a full version of Adobe Acrobat the advanced button of the Print Driver popup has check options for Marks under Marks and Bleeds while printing from Adobe Reader does not.

  • Incorrect entries from application server file read dataset .

    As i am using below code for fetching file data from application server to internal table in custom report.
    data in internal table in inconsistent is there any another way to do in?
    report zparoman.
    TYPES: BEGIN OF ty_bkpf,  " STRUCTURE DEFINATION bkpf
             belnr TYPE belnr_d ,
             bukrs TYPE bukrs,
             gjahr TYPE gjahr,
             bldat TYPE bldat,
             cpudt TYPE cpudt,
             waers TYPE waers,
             blart TYPE blart,
             budat TYPE budat,
             xblnr TYPE xblnr1,
             bktxt TYPE bktxt,
      END OF ty_bkpf.
    DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf INITIAL SIZE 0, " INTERNAL TABLE it_BKPF
           wa_bkpf TYPE ty_bkpf.                                   " work area wa_bkpf
    TYPES: BEGIN OF ty_bseg,
           belnr TYPE belnr_d,
           bukrs TYPE bukrs,
           buzei TYPE buzei,
           bschl TYPE bschl,
           umskz TYPE umskz,
           hkont TYPE hkont,
           zterm TYPE dzterm,
           wrbtr TYPE wrbtr,
           kostl TYPE kostl,
           prctr TYPE prctr,
           mwskz TYPE mwskz,
           sgtxt TYPE sgtxt,
           zuonr TYPE dzuonr,
           zlspr TYPE dzlspr,
           zlsch TYPE schzw_bseg,
       END OF ty_bseg.
    DATA: it_bseg TYPE STANDARD TABLE OF ty_bseg INITIAL SIZE 0, "internal table it_bseg
           wa_bseg TYPE ty_bseg.                                   "work area wa_bseg
    TYPES:BEGIN OF ty_final,                                    " final structue defn
            header TYPE c LENGTH 3,
            belnr TYPE c LENGTH 10,"belnr_d,
            bukrs TYPE c LENGTH 4,"bukrs,
            gjahr TYPE c LENGTH 4,"gjahr,
            bldat TYPE c LENGTH 8,"bldat,
            cpudt TYPE c LENGTH 8,"cpudt,
            waers TYPE c LENGTH 5,"waers,
            blart TYPE c LENGTH 2,"blart,
            budat TYPE c LENGTH 8,"budat,
            xblnr TYPE c LENGTH 16,"xblnr1,
            bktxt TYPE c LENGTH 25,"bktxt,
            buzei TYPE c LENGTH 3,"buzei,
             bschl TYPE c LENGTH 2,"bschl,
             umskz TYPE c LENGTH 1,"umskz,
             hkont TYPE c LENGTH 10,"hkont,
             zterm TYPE c LENGTH 4,"dzterm,
             wrbtr TYPE c LENGTH 13,"wrbtr,
             kostl TYPE c LENGTH 10,"kostl,
             prctr TYPE c LENGTH 10,"prctr,
             mwskz TYPE c LENGTH 2,"mwskz,
             sgtxt TYPE c LENGTH 50,"sgtxt,
             zuonr TYPE c LENGTH 18,"dzuonr,
             zlspr TYPE c LENGTH 1,"dzlspr,
             zlsch TYPE c LENGTH 1,"schzw_bseg,
      END OF ty_final.
    DATA: it_final TYPE STANDARD TABLE OF ty_final INITIAL SIZE 0, " final internal table it_final
            wa_final TYPE ty_final.                                  " work area wa_final
    TYPES: BEGIN OF temp_str,
    wa_string(5000) TYPE c,
       END OF temp_str.
    DATA:it_str TYPE TABLE OF temp_str,
           wa_str TYPE temp_str.
    DATA: gv_file   TYPE rlgrap-filename.
    gv_file = 'E:\USR\SAP\ECS\SYS\CSL_FIGL_TRANS_DATA_04172014162215.TXT'.
    OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.     "Opening file from Application server
    IF sy-subrc EQ 0.
    *  DO 2 TIMES.
       DO.
         READ DATASET gv_file INTO wa_str.
         IF sy-subrc = 0.
           APPEND wa_str TO it_str.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
       ENDIF.
    *   WRITE:/ 'HELLO'.
    LOOP AT it_str INTO wa_str.
        split wa_str at ' ' into
           wa_final-header
            wa_final-belnr
            wa_final-bukrs
            wa_final-gjahr
            wa_final-bldat
            wa_final-cpudt
            wa_final-waers
            wa_final-blart
            wa_final-budat
            wa_final-xblnr
            wa_final-bktxt
            wa_final-buzei
             wa_final-bschl
             wa_final-umskz
             wa_final-hkont
             wa_final-zterm
             wa_final-wrbtr
             wa_final-kostl
             wa_final-prctr
             wa_final-mwskz
             wa_final-sgtxt
             wa_final-zuonr
             wa_final-zlspr
             wa_final-zlsch.
                                             " Split the string separated by SPACE
         append wa_final to it_final.
    ENDLOOP.

    Hi ,
    Try to open the file with encoding UTF-8 :
       Open dataset file for INPUT in TEXT MODE ENCODING UTF-8 .
    Regards

  • Script Help - Working with Files - Reading/Writing

    Hey Folks,
    I need help build a script that will read a text string from a specific .INI file, and then write that string to a file along with the name of the computer where the string originated from.
    I plan on deploying this script to our targeted workstations with SCCM 12, so it does not need recursive abilities. We want each of the machines which run the script to write their data to a single file with a date stamp as part of the name. The data written
    needs to include the unique string which follows this format "devicename=DJ########", along with the computer's name. The device name which needs to be extracted starts with DJ and is followed by an 8 digit number. It would be better if we could
    use export-csv than out-file. 
    This is what my very inexperienced self came up with so far:
    get-content 'C:\users\Public\Something\myfile.ini' | Select-String devicename=dj | out-file
    \\server\folder\data.txt -append
    I
    found this bit of code which should allow me to set the file name to a date, but I am unsure exactly how to implement this:
    $enddate = (Get-Date).tostring("yyyyMMdd")
    $filename = 'C:\Documents and Settings\User\Desktop\' + $enddate + '_VMReport.doc'
    $filename
    The developer of a core piece of software requires all computers have a unique ID, but provides absolutely no tools or guidance for tracking this crucial information. Any input you can provide will be greatly appreciated!
    Please help us fix this nightmare! Thank you in advance!

    I am trying to add a step where the script grabs a list of all domain workstations and saves it to a file. This file is then used as the input for the rest of the script. There is a problem with the way the computers names are imported using this method.
    Here is the script:
    # Rename the existing DJNumbers.csv to yesterday's date
    $date = (Get-Date).AddDays(-1)
    Rename-Item -Path '\\Server\Library\DJs\DJnumbers.csv' -NewName ("DJNumbers_{0}.csv" -f (Get-Date $date -Format yyyy-MM-dd))
    #Save a list of all current AD computers
    Get-ADComputer -Filter * | select name | Out-File \\Server\C$\DJs\complist.csv
    #Extract the DJ number for every computer in complist.csv
    Get-Content '\\Server\C$\DJs\complist.csv' |
    ForEach-Object {
    $devicename=get-content "\\$_\C$\Users\Public\myfile.ini" | Select-String devicename=
    $djnumber=$devicename -replace "devicename=","`t"
    $prize=$_ += $djnumber
    $prize | Out-File \\Server\Library\DJs\DJnumbers.csv -Append
    The problem is that the computer names include a ton of blank spaces if I use Out-File in the line:
    #Save a list of all current AD computers
    Get-ADComputer -Filter * | select name | Out-File \\Server\C$\DJs\complist.csv
    Error looks like this:
    get-content : Cannot find path '\\CM112233
    \C$\Users\Public\Software\myfile.ini' because it does
    not exist.
    At line:11 char:13
    + $devicename=get-content "\\$_\C$\Users\Public\Software\...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (\\CM112233 ...ction\myfile.ini:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
    If I use Export-Csv, it puts ""'s around the computer names and that breaks it as well.
    #Save a list of all current AD computers
    Get-ADComputer -Filter * | select name | Export-Csv \\Server\C$\DJs\complist.csv
    This is the error:
    get-content : Illegal characters in path.
    At line:11 char:13
    + $devicename=get-content "\\$_\C$\Users\Public\Software\ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (\\"CM112233"\C$\U...are\myfile.ini:String) [Get-Content], ArgumentException
    + FullyQualifiedErrorId : ItemExistsArgumentError,Microsoft.PowerShell.Commands.GetContentCommand

  • Creating list of folders from filenames with files organized in subfolders within

    Hi all. This is my first post in the Apple Support Community and I really hope that someone can help me as I'm using apple script for the first time.
    I have a list of hundreds of items that are each .jpg, .cr2, or .mov. Certain filenames have multiple extensions, ex: Q95A7170.CR2 & Q95A7170.jpg.
    I'm looking for an applescript or automator action that will allow me to create a folder out of each filename with 5 subfolders in it
    I need the subfolders to be called:
    AUDIO
    COLOR
    METADATA
    PICTURE
    PROXY
    In this instance I need all the .mov, .cr2, and .jpgs to be routed to the PICTURE folder. In later instances I'll need to route .mxf to PICTURE AND .xml .sif  & .thm to METADATA.
    So for example I have a list of that looks like this
    and I want a script that will make it look like this (i did all of this manually: creating the folders, renaming them, and putting the specific files into the picture folder)
    (not nearly a fraction of the list -- there are hundreds and hundreds of files)
    I've been researching applescripts for hours but the only script that i could make work and was very useful was this one to create the folders out of the names of the files:
    tell application "Finder"
              set selected to selection
              set current_folder to item 1 of selected
              set mlist to every file of current_folder
              repeat with this_file in mlist
                        set cur_ext to name extension of this_file
                        set new_name to text 1 thru -((length of cur_ext) + 2) of (name of this_file as text)
                        set new_folder to make new folder with properties {name:new_name} at current_folder
      move this_file to new_folder
              end repeat
    end tell
    Even with this script I had to manually copy all of the duplicate file named .jpgs out of the folder before it would properly run.
    Also I've found these scripts but I'm not sure what information to change. Like I said, I don't know much about code at all and I'm finding more research about it is just digging me deeper in a hole that I'm not entirely ready for.
    Here are the other two scripts that CLAIM they can do what I'm looking for, but I haven't gotten them to work.
    1.
    set pathToFolderOfTTUFiles to (path to the desktop as text) & "TTU:"
    tell application "Finder"
        set theFiles to every item of folder pathToFolderOfTTUFiles whose name extension is not "csv" and kind is not "Folder"
        repeat with theFile in theFiles
            set lengthOfExtension to (length of (theFile's name extension as text)) + 1
            set fileNameWithoutExtension to text 1 through -(lengthOfExtension + 1) of (theFile's name as text)
            set theFolder to make new folder at folder pathToFolderOfTTUFiles with properties {name:fileNameWithoutExtension}
            set theContentFolder to make new folder at theFolder with properties {name:"content"}
            make new folder at theContentFolder with properties {name:"archive"}
            set theContentDisplayFolder to make new folder at theContentFolder with properties {name:"display"}
            set theMetadataFolder to make new folder at theFolder with properties {name:"metadata"}
            make new folder at theMetadataFolder with properties {name:"archive"}
            set theMetadataDisplayFolder to make new folder at theMetadataFolder with properties {name:"display"}
            move theFile to theContentDisplayFolder
            set pathToCSV to pathToFolderOfTTUFiles & fileNameWithoutExtension & ".csv"
            if exists pathToCSV then move pathToCSV to theMetadataDisplayFolder
        end repeat
    end tell
    2.
    set myFolder to "FOLDERPATH"
    tell application "Finder" to set myFiles to folder myFolder's files as alias list
    repeat with aFile in myFiles
        tell application "System Events" to set {fileName, fileExt} to {name, name extension} of aFile
        set baseName to text 1 thru ((get offset of "." & fileExt in fileName) - 1) of fileName
        do shell script "mkdir -p " & (quoted form of (POSIX path of myFolder)) & "/" & baseName & "/{\"content\",\"metadata\"}/{\"display\",\"archive\"}"
        tell application "System Events"
            if fileExt is "pdf" then move aFile to (myFolder & ":" & baseName & ":content:display" as text)
            if fileExt is "csv" then move aFile to (myFolder & ":" & baseName & ":metadata:display" as text)
        end tell
    end repeat
    (the .pdf, .csv extensions are examples from the person who posted that discussion.)
    I tried using both of these codes but to no avail.
    Overall, this process is incredibly time-consuming and this is the first time I am using apple script so I know almost nothing about code.
    Also I don't know if this changes anything, but all of these files are on an external and I'm trying to save them back on this external.
    PLEASE HELP! I am a night assistant editor doing very tedious work at 3:00 AM or later and anything that would expedite this process would be so unbelievably appreciated. Please, someone who's more experience with code and who's smarter than I am on this topic, help me! I know there must be a way to automate this process!
    Please and so many thank yous! Really, this code would save me 40+ hours of eye-tiring work.
    Shelby

    This is how you'd do it in AppleScript.  I assume you can see how to expand it to different file extensions...
    set workFolder to "/path/to/folder"
    tell application "System Events"
      -- get files to work on
              set filesToProcess to files of folder workFolder whose visible is true
              repeat with thisFile in filesToProcess
                        set {fileName, fileExt} to {name, name extension} of thisFile
      -- get name of file without extension
                        set rootName to text 1 thru -((length of fileExt) + 2) of fileName
      -- make sure a correctly named folder exists
                        set targetFolder to my checkForFolder({parentFolder:workFolder, folderName:rootName})
      -- sort files into subFolders, making sure subfolders exist
                        if fileExt is "jpg" or fileExt is "cr2" or fileExt is "mov" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"PICTURE"})
                                  move thisFile to targetSubfolder
                        else if fileExt is "xml" or fileExt is "sif" or fileExt is "thm" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"METADATA"})
                                  move thisFile to targetSubfolder
                        else if fileExt is "mxf" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"PICTURE"})
                                  move thisFile to targetSubfolder
                        else
      -- skip unknown file extensions
                        end if
              end repeat
    end tell
    to checkForFolder({parentFolder:fParent, folderName:fName})
      -- find or create a folder
              tell application "System Events"
                        if not (exists folder fName of folder fParent) then
                                  set output to POSIX path of (make new folder at end of folder fParent with properties {name:fName})
                        else
                                  set output to (POSIX path of (folder fName of folder fParent))
                        end if
              end tell
      -- returns a POSIX path
              return output
    end checkForFolder

  • Printing PDF from IE with Adobe Reader - extra white space at top of page

    I searched the forums far and wide but did not find this question or information to answer it.  If it's out there, I'd be much obliged if you'd point me in the right direction.
    A user of the web app for which I do tech support just called to say that starting today, whenever he opened a PDF from our app (in IE), the PDF looks fine on screen but when he prints the PDF, every page has extra blank/white space inserted at the top, which cuts off the bottom inch or two of each page.
    No other users have called with this complaint, and if changes to our app or an automatic background Adobe Reader or IE update caused this problem, I would have heard from many users.  I have a sneaking suspicion I have heard about this from other users, but since troubleshooting their IE or Adobe isn't exactly my job, I don't know if I did any more than advise them to talk to their tech support people. 
    I can't recreate his problem (read: it works fine for me), but I'd like to help him.  Can anyone think of a reason why this might be happening?
    Thanks in advance.

    What I know:  He's using Adobe Reader X.  I do not know if it's the most recent version.  The problem only exists with PDFs from our web app; he's not having trouble with other sites or with other PDFs.
    I do not have a copy of the PDF; I can't give you the copy I downloaded when I logged into his account because there is proprietary confidential information on it, but everything worked fine for me and he's the only user with this complaint, so I believe it's related to his PC or printer, not to our app or to Adobe per se. 
    I sent him email asking for more information, but I do not know what printer he's using.  I don't even know what version of Windows he's running. 
    Based on some info from Adobe, I suggested he make sure he's using the most recent version (10.1.2), try 'print as image" to see if that's any more successful, and make sure his printer drivers are up to date. 
    Given the nature of tech support, if he solves the problem or finds a workaround he's happy with, I may never hear from him again to know.  I just wanted to know if this was a known issue and what recommended resolutions for it might be.  Having not found anything on the web at large, I figured the Adobe forums would be a good place to ask.
    Thanks for the time you took to answer.

  • Invoking Procedure from BODS with OUT (output) parameters

    Hi Experts,
    Need your help to invoke Oracle DB Procedure having output parameters from BODS Script
    --Thanks

    Hi Balakrishna,
    IF you want to execute the stored procedure from script first import the SP into your data store first and you can try the below scripts, i am not sure that it will works kindly try and let me know.
    Datastore Name.Owner.Procedure_Name( $Var_1 , $Var_2 );
    or
    SQL('Datastore_name',exec sp_xxx);
    Thanks and regards,
    subbu CH.

  • Export from BAM with file?

    Hi,
    I've created an export file and when I run it i get this:
    C:\Documents and Settings\admesos>icommand cmdfile=DataObjectExport.xml domain=SVKTEST
    Oracle BAM Command Utility
    10g Release 3 (10.1.3.1.0) [Build 3 5 5787 0, ADC Version 1003.0]
    Copyright (c) 2002, 2006 Oracle.
    All rights reserved.
    Error while processing command "Export".
    [ErrorSource="ICommandEngine", ErrorID="ICommandEngine.Error"]
    You are unable to connect to the Oracle BAM services. Contact your system admini
    strator if the error persists.
    [ErrorSource="ActiveDataCache", ErrorID="ADCServerConnectionError"]
    The requested name is valid, but no data of the requested type was found
    [ErrorSource="mscorlib"]
    Anybody know how to fix this?
    Regrds Eskil

    Hi Kapil,
    I'm trying to export all my data objects by using a xml file.
    It fails, I think it might be some security setting on the machine, ICommand seems to use another user than the one I'm logged in as.
    /Eskil

Maybe you are looking for

  • Song will not show up on album in Ipod

    I have an Ipod classic.  In itunes, the songs on an album all show up there like they are supposed to.  But on the ipod two songs are not there and they don't play when I play that album.  I have had this problem before and changed the sort album, so

  • Podcasts won't sync to ipod; podcast icon gone

    I have been happily downloading podcasts to Itunes and syncing them to my ipod nano 4th generation for months. Suddenly, after syncing two podcasts (Itunes said successfully), there were no podcasts on the nano and when I connected it again, the podc

  • Adobe Flash Media Live Encoder 3.1 crashes at launch!

    Hi there, Accidently asked this question in the flash area--oops.  Here it is, in the correct section now.  :-) I have used this Encoder extensively on my PC over the past couple of years and have never had any problems.  I am thinking that an update

  • MacBookPro / 15" / Intel i7 wakes immediately after sleep

    My new MBP (MacOS X 10.6.4) has been waking up immediately after I put the lid down, or select sleep from the Apple Menu. I have Boot Camp installed and Parallels 5, but I'm starting to suspect neither of those is the culprit. I wind up shutting the

  • PowerPoint Slides into Captivate Responsive Project

    I would like to bring a PowerPoint presentation into captivate using the responsive project functions. Basically, I would like to use my PowerPoint slides but be able to format them for mobile use as well. How should I go about this?