How to add file name to path

Hi,
I use this sentence:
set temp to path to home folder from user domain
which give me the name of the home folder of the current user. But how in Apple script I can append a file name to that to get something like:
"Macintosh HD:Users:user:temp_file"
Thanks

Hi,
Now it is working just well.
I kept 2 variables: one with the POSIX file path for my do shell script and another one (using the provided tip here) for the Applescript function.
The only problem I had left was that teh file was writen in, maybe, UTF8 so I added to the open for access a "as text" at the end to make the file as straith text file.
I always found languages like Applescript a little bit hard to learn. Strangely, I have less difficulty with Cocoa!
Thanks for avery one here!

Similar Messages

  • How to add file name by sqlldr

    Hi All,
    Can anyone kindly give me an approach to use a variable in a sql loader ctl file. I am trying to add the value before each insert of row and this value is the file name. So the question is how can I dynamically identify the input data file name, if not, is there a way I can make my SQL Loader to insert a value (file name) before each row into the table.
    my control file like below ,
    LOAD DATA
    INTO TABLE "user"."AAA_BILL"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    EXCEPTIONS "USER"."AAA_BILL"
    FIELDS TERMINATED BY '|'
    (Streamnumber ,
    MSID ,
    UserName,
    Domain,
    UserIP ,
    Correlation_ID)and the loading script as below ,
    for j in $(GetFileNames)
    do
    let i=$i+1
    sqlldr user/pass control="/u01/ctrlfile/loadBILLDtl.ctl" log=$WiMAXlog$j.log data=$WiMAXsource$j   bad=$WiMAXlog$j.bad
    GetFileNames ()
    sqlplus -s user/pass << EOF
    set echo off
    SET FEEDBACK OFF
    SET heading off
    set pagesize 50000
    select bi_file_name from dbm_bill_head where bi_file_name like 'WiMAX_%' and bi_auto_status=35  order by bi_file_name;
    EOF
    }What I am trying to accomplish here is, I want to insert the data file name along with other data in the data file into table AAA_BILL and this table has the file name coloumn, but the data file does not contain the file name as one of its contents.
    Note : my DB is 10G and OS is RHEL
    any help please ,
    Edited by: 876602 on 18/12/2011 05:44 ص

    Hi,
    Now it is working just well.
    I kept 2 variables: one with the POSIX file path for my do shell script and another one (using the provided tip here) for the Applescript function.
    The only problem I had left was that teh file was writen in, maybe, UTF8 so I added to the open for access a "as text" at the end to make the file as straith text file.
    I always found languages like Applescript a little bit hard to learn. Strangely, I have less difficulty with Cocoa!
    Thanks for avery one here!

  • File adapter - How to pass File name and path at runtime

    Hi gurus,
    We want to use PI 7.0 as an ftp server and expose the config as a webservice where the service consumer can pass one or more file names and the path to pick them and drop them on a fixed ftp server.
    So precisely, I need to be able to set the file name, target directory parameters in both sender and receiver file/ftp adapters at runtime. is this possible at all ?
    I am aware of passing Adapter specific parameters from sender file adapter to receiver file adapter to create the same folder structure and file names. But my requirement is different. I hope I am clear.
    Could I please get some advise on this .
    Thanks & Kind Regards,
    Jhansi.

    Hi Jhansi,
    Either you can go ahead with dynamic configuration as said by other SDN'ers. Else can go with Java Mapping:
    Here is the code for Java Mapping:
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.text.*;
    import java.util.*;
    public class GetDynamicConfiguration implements StreamTransformation {
    private Map param;
    public void setParameter(Map map1) {
    this.param = map1;
    public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException {
    try {
    AbstractTrace trace = null;
    // a) Set ouput File name
    String directory=null;
    trace = (AbstractTrace)param.get(StreamTransformationConstants.MAPPING_TRACE );
    param.put(DynamicConfigurationKey.create("http://sap.com/xi/XI/Dynamic", StreamTransformationConstants.DYNAMIC_CONFIGURATION), "");
    DynamicConfiguration conf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    String filename =conf.get(key);
    conf.put(key, filename);
    trace.addInfo("File name is "+filename);
    if(filename.equals("in.txt"))
    directory = "/home/ftpxi/in";
    if(filename.equals("test.txt"))
    directory = "/home/ftpxi/in/test";
    if(filename.equals("shweta27.txt"))
    directory = "/home/ftpxi/in/test";
    trace.addInfo("Directory name is "+directory);
    conf.put(key1, directory);
    // b) Just copy input file to output file
    byte[] b = new bytehttp://inputstream.available();
    inputstream.read(b);
    outputstream.write(b);
    } catch (Exception exception) {
    exception.printStackTrace();

  • How to place file names with thumbnails?

    I have several thousand images that need to go online but I cannot for the life of me figure out how to add file names to the thubnails. Every bit of documentation I've read talks about adding it to the larger images only. I figured that part out but can't I have file names for the thumbnails too?

    Bummer. I was hoping for a secret key to take me there. I have too 
    many images that can be scanned via thumbnails and for the detail 
    shots they can go larger. There is no way I can use this as it is with 
    9000+ images that need to be gone through quickly. Thanks for the 
    answer.
    Mark

  • How to print the report file name and path and the last mod date

    Good morning,
    I am trying to print on the footer of the report the report file name and path as well as the report last modification date.
    Anyone would know how I can do that? I have checked the doc but found nothing.
    Thks. Philippe.

    Did you ever determine how to print report name and report last mod date?
    Thanks

  • How to find PG.xml file name and path associated with a FUNCTION

    Hi,
    I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
    OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
    How to find PG.xml file name and path assoicated with above funtion.
    Thanks,
    ashok

    Ashok,
    Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
    OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
    OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I put the file name and path into either the header or the footer?

    I need to keep track of pdf documents as their names or locations sometimes change.  I need to show both file name and path, preferably in the header.  I would also like it to refresh automatically when I change, say, the file name, but that's not as essential as the basic function of showing the file name and path.

    You will need to do this with a text field and a Javascript that executes on open.

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • File name and path should be passed as parameter

    hi all,
    i am writing a set of statements into the text file. But i have to pass the file name and also path as a user enterable parameter.
    please suggest me to proceed further.
    for ex: i am storing it as
    output:=text_io.fopen(c:abc\def\out.txt','w');
    right now i am giving like this and storing the data, but now i have to allow file name and path as user parameter.
    please suggest me.
    Thanks..

    Hi,
    for ex: i am storing it as
    output:=text_io.fopen(c:abc\def\out.txt','w');
    right now i am giving like this and storing the data, but now i have to allow file name and path as user parameter.
    please suggest me.Well, how hard can it be?
    You have to get those two parameters from your application into two variables, say "v_filename" and "v_pathname", and then create the file just the same way using the variables to construct the full path :
    output:=text_io.fopen(v_pathname || '\' || v_filename,'w');

  • File Name and Path special field

    Post Author: puser01
    CA Forum: .NET
    I have a report created in CR 9 with the File Name and Path special field on the report displayed correctly. when i try to run it on CR XI environment i get this:
    C:\WINDOWS\TEMP\{4D86438D-54F5-4EEF-A0AB-05D5EB2BFF35}.rpt
    How can i correct this?

    Our installer names don't make it easy for the new user, or the seasoned veteran for that matter. Although both those installers have 2008 in the name, they are for entirely different products.
    CRRedist2008_x86.msi
    This MSI installer is used to install the runtime for Crystal Reports Basic for Visual Studio 2008 - version 10.5.
    cr2008fp35.exe
    This installer package is used to install the CR .NET runtime for Crystal Reports 2008 - version 12.3.
    Since you've updated your development system to Crystal Reports 2008 you'll only want to use the runtimes listed on this reference page - http://www.sdn.sap.com/irj/sdn/crystal-xcelsius-support?rid=/webcontent/uuid/10e38d93-7f07-2d10-beae-e739182f8ada. [original link is broken]
    I suggest either of these
    SP 3
    https://smpdl.sap-ag.de/~sapidp/012002523100007123592010E/cr2008sp3_redist.zip
    FixPack 3.5
    https://smpdl.sap-ag.de/~sapidp/012002523100006341772011E/cr2008fp35_redist.zip

  • Log File name and path to check Excel Download

    Hi ,
    When we download a report in Excel/PDF/HTML is it logged in any log file ? What is the log file name and path?
    Regards
    Anand

    Hi...
    one of my user tried to download the report in excel format. that excel was not opening. then he tried to download the same report again. this time he was able to open thee excel.
    So he wants to investigate why this happened first time. could you please suggest how we can investigate this?
    Regards
    Anand

  • Separating file name and path

    Hi,
    I need to separate the file name and path of the file which I am uploading from my BSP appl.I am using SO_SPLIT_FILNAME_PATH ,but it is not working because this fm identifies '\' only from GUI front end.
    How do I separate the file name and path in BSP ?
    Regards,
    Ananya

    Assuming that you are using File Upload tag for file upload:
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    file_name      = fileUpload->file_name.
    file_mime_type = fileUpload->file_content_type.
    file_length    = fileUpload->file_length.
    file_content   = fileUpload->file_content.
    Data : filepath type string,
           filename type string,
           t1 type string.
    filepath = file_name .
    while filepath CA ''.
      split filepath at '' into t1 filename.
    endwhile.
    In my sample code above, filename attribute will contain the name of the file uploaded.
    Hope this solves the problem.
    Regards,
    Ravikiran.

  • [CRM 5.0] How to add file attachements to created ticket (transaction)

    Hi!
    I have to do engancement and need to add file attachements to tickets (transaction) documents. I made ticket creation but I don't know how to add file attachements to it.
    Could someone help? Mayby some function module name?
    Thanks for response!
    KK

    class cl_crm_documents has a number of methods which should be of use to you.
    create_with_table will allow the file to be created from data held in a table and attached to the activity.
    create_with_File will allow you to create with reference to an existing file.
    here is an example of the use of create_with_table.
    form create_document  using    p_bus_obj type sibflporb
                                   p_properties type sdokproptys
                                   p_file_access type sdokfilacis
                                   p_file_contents type sdokcntbins
                          changing p_error type skwf_error.
      call method cl_crm_documents=>create_with_table
       exporting
          business_object     = p_bus_obj
          properties          = p_properties
    *                properties_attr     =
                 file_access_info    = p_file_access
    *                file_content_ascii  =
          file_content_binary = p_file_contents
    *                raw_mode            =
    *                text_as_stream      =
    *                parent_folder       =
    *                package_id          =
        importing
    *                loio                =
    *                phio                =
          error               = p_error.
    endform.                    " CREATE_DOCUMENT
    p_bus_obj-typeid needs to be set with guid of transaction
    p_bus_obj-catid = 'BO'.

  • Question about pass file name and path to file write adapter

    I need to pass file name and path to file adapter for write. I got partial answers from thread Re: Get File name using File Adapter , but seems InboundHeader_msg or outboundHeader_msg only takes file name, how do I pass file directory?
    since I still have to specify file format (like xxx_%xx%.txt) in the file adapter wizard. Will this name conflict with what the name defined in InboundHeader_msg ?
    Similarly, how can I pass a file name and path to a file synchread adapter?
    Thanks,
    Message was edited by:
    user531689

    Just overwrite the filename in the WSDL file that was generated

  • Target Data File Name and Path

    Hi,
    I'm trying to deploy a mapping that writes data into a file, but I need to dynamically set the name and the directory where I want to write this file. The only workaround I found was manually change the pl/sql generated code and change the values in the FOPEN call with a parameter, but this is no what I really want to do. Does anyone know how to tell WB not to hardcode the file name and path?
    I really appreciate you time,
    thanks in advance,
    Matias

    Carla,
    Unfortunately our releases do not go that fast...
    What you could do as an intermediate solution (this is what I would do) is create your mapping and load into a staging table (this can happen in set-based mode so would be fast). In a post mapping process you manually write to the flat file by making the calls to FOPEN etc. by selecting from the staging table. The post mapping process can have an input parameter that you dynamically pass (i.e. via a mapping parameter) and set the file name.
    Mark.

Maybe you are looking for

  • Error Downloading Music to Network Drive

    I've moved my Music Library to a networked drive (NTFS) on a Windows XP system. The workstation that I'm running iTunes on is also Windows XP. Since then I cannot download purchased MUSIC (haven't tried videos yet). After initiating download via eith

  • Incorrect values with AGO function

    Hi, I am trying to fix a problem where my AGO function is producing close but not 100% correct values. I have: Fact Table (pk is by date, employee, and measure keys) Dim Date Table (only date, month, quarter, year - very simple) Month and quarter are

  • Line "red, yellow, green and black..." on screen of iPod

    after i upgraded iPod (4 Gen) to version 4.3, i see line color in my ipod, please can help me? how to make it? is line is from "hardware or software" maybe it's a bug?

  • Disabling the dbc security authentication

    Hi All, Apps : 11.5.10.2 DB : 9.2.0.8 When i am doing this "Disabling the dbc security authentication", i need to down the application services?is it compulsory to do this? Enable SECURE authentication jre oracle.apps.fnd.security.AdminAppServer apps

  • Brief Idea about IP

    Hi Experts, can any one give brief idea about IP. I want know what is main use of IP with small Examples. How can i help to my client with IP for Improving their business . Thanks in advance Satya