Ho to get file name and full path of a local file

I want to be able to get the file name and it's full path of
a local file. I was thinking of using "FileReference" but
FileReference doesn't permint accessing the local file path. Can
anyone suggest a way of doing this.
Thanks

You will have to create 2 different versions.
See this example we have created using JSystem
http://jsystem.flashjester.com
Download the example file provided.
Hope this helps.
Regards
FlashJester Support Team
e. - [email protected]
w. - www.flashjester.com
"This has been one of the most impressive and thoroughly
pleasant
experiences of customer support I have ever come across -
astounding!"
Director - hedgeapple

Similar Messages

  • How to dynamically define a file name and its path in a web application

    Hi, I want to create a simple web application that reads from an XML file and displays the data back to the user. The xml file is created independent of my application on the same machine that the Application Server runs. How can I define my xml file name and/or path to be independent of my code and not hard-coded in my application?

    By an external configurationfile? That can be a propertiesfile, a xml file, an ini file, a plain vanilla txt file, etcetera.

  • How to see document file name with full path when hovering mouse over title bar?

    Using PS CS6, Windows 7 x64.
    I was under the impression that when hovering my mouse over the document title bar, I would see a tooltip showing the full file name, including the path.  This isn't happening and I'm wondering if there is a way to do this.  I know I can click File > Save As, or Ctrl+Shift-S to see the full path, but hoving over the title bar would be easier.  (What I am seeing now in the tooltip is the file name, % magnification and which layer I have selected.  Basically, the tooltip is just showing what's in the title bar without hovering.)
    Thank you!
    John

    Hm, I wonder if it's something they may have enabled only for the Cloud version (I have 13.1.2).  If so, I didn't notice the change at the time of the upgrade.
    Nope, it's not that - I have a virtual machine for testing with 13.0.1 installed...  This is what I see there:
    -Noel

  • Workflow with images,file names and full captions.

    I am working on my mother's memoirs, which will include a block of photo pages.  Those pages will be laid out by a friend.  I would like to use a contct sheet of some kind as a reference to what is to be included with what caption but am discovering just how difficult PE8 Organizer is to work with.
    First I tried the obvious print contact sheet and discoverd that captions are truncated if they run wider than the image itself.
    Secondly I tried a photo book and found that large images do not automatically resize to fit the picture placeholders. Seemed to pick up full caption but I have too many pictures to manually fit.
    Third I tried a web page output but then captions can't be copy and pasted for inclusion into group caption panels!
    Then it occurred to me that even just a list of file names and captions would be sufficient ... but even that is too much for an Adobe catalog to give up!
    All I want is a reference to images and captions, ideally grouped 4 at a time per page as they will be shown in those picture pages.
    Any suggestions would be welcomed.

    I can see two ways to do what you want.
    The first one is to divide you workflow in two steps. Install the free software FastStone image resizer, which can do a batch to resize and put your caption where you want. Batch process the files in a new folder while renaming them with something like 'old name'+ 'resized'. This is to avoid duplicate names. Import them into the organizer. Create an album with all those files, and put them in the correct printing order. Select all and export 'as new files' renaming them with 'common base name', in original format. That should keep the custom order of your project.
    There are also batch renaming and resizing with the affordable Elements+ add-on, but I suppose the first solution will be easier.

  • How to get the name and the path of the font used in photoshop (not textItem.font)

    I'm trying to get the real name of the font and the path, is there a "easy" way to do it ?
    i need to get the font file (*.ttf or *.otf) and copy to the same directory as the psd file, that's why textItem.font doen't work for me.
    thanks in advance

    You could try this as it looks as if you are using Windows.
    Run the VBS script to create a fontlist file on the desktop.
    Then run the javaScript on the PSD document.
    It should copy the fonts to the same folder as the document, it will also create a text file with a list of fonts.
    It didn't find all the fonts in my test psd maybe because it wasn't in the windows/font folder?
    VBS.
    Set wshShell = WScript.CreateObject("WScript.Shell")
    Set wshSysEnv = wshShell.Environment("PROCESS")
    sMyFile = "c:" & wshSysEnv("HOMEPATH") & "\Desktop\Fontlist.txt"
    Dim objFileSystem, objOutputFile
    Dim strOutputFile
    Set objFileSystem = CreateObject("Scripting.fileSystemObject")
    Set objOutputFile = objFileSystem.CreateTextFile(sMyFile, TRUE)
    Dim str
    Const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
    objReg.EnumValues HKEY_LOCAL_MACHINE, _
    strKeyPath,arrEntryNames,arrEntryZZZ
    For Each entry in arrEntryNames
    str = wshshell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts\" & entry)
           objOutputFile.WriteLine(entry & "," & str)
    Next
    objOutputFile.Close
    javaScript.
    #target photoshop;
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    try{
    var Path = activeDocument.path;
    }catch(e){
        alert("This document needs to be saved before running this script!");
        return;
    var FontFile = File(Folder.desktop + "/FontList.txt");
    if(!FontFile.exists){
        alert("You need to run the vbs script first to create the FontList file!");
        return;
    var FontList = new Array();
        FontFile.open('r') ;
    while(!FontFile.eof){  
       strInputLine =FontFile.readln();
       if (strInputLine.length > 3) inputArray  = strInputLine.split(",");
       if(inputArray.length == 2) FontList.push([[inputArray[0]],[inputArray[1]]]);
    FontFile.close();
    var PSDtextLayers = getNamesPlusIDs();
    PSDtextLayers = UniqueSortedList(PSDtextLayers);
    for(var a in PSDtextLayers){
        for(var f in FontList){
             var rex = new RegExp;
             rex = PSDtextLayers[a].toString();
            if(FontList[f][1].toString().match(rex,"i")){
                var From = new File("/c/windows/fonts/" + FontList[f][1].toString());
                var To = new File(Path + "/"+  FontList[f][1].toString());
                From.copy(To);
                break;
    var rFonts = new File(Path + "/required Fonts.txt");
    rFonts.open('w');
    rFonts.write(PSDtextLayers.join('\n'));
    rFonts.close();
    function UniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;for (var k in unduped) {
       uniques.push(unduped[k]);}
    return uniques;
    function getNamesPlusIDs(){
       var ref = new ActionReference();
       ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( 'NmbL' ));
       ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
       var Names=[];
    try{
        activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
       for(i;i<count;i++){
           if(i == 0) continue;
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            if(layerName.match(/^<\/Layer group/) ) continue;
            if (desc.hasKey(stringIDToTypeID('textKey'))){
                desc = desc.getObjectValue(stringIDToTypeID('textKey'));
                desc = desc.getList(stringIDToTypeID('textStyleRange')).getObjectValue(0).getObjectValue(stringIDToTypeID('textStyle'));
                var postScriptName = desc.getString( stringIDToTypeID('fontPostScriptName'));     
    Names.push(postScriptName);
    return Names;

  • How to copy a files name and spotlight comments to a text file for an entire folder

    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download,  or program code supported in xcode that will do at least one of the following things?
    1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
    File Name1- Spotlight Comment for file 1
    File Name 2- Spotlight Comment for file 2
    . for all 700 files in a folder
    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
    3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
    4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
    5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
    Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
    Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.

    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

  • How to  validate a file  given the file name and the path

    hi ,
      is their any function module which can validate a file present in the presentation server given its filename and path name

    Hi,
    Refer Sample Code Below:
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : rb_pc  RADIOBUTTON GROUP r1 DEFAULT 'X', "For Presentation
                 p_f1   LIKE rlgrap-filename,            
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN SKIP.
    AT SELECTION-SCREEN ON p_f1.
      IF  p_f1 IS INITIAL.
        MESSAGE e000(zmm) WITH text-002. ' Enter File Path
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f1.
    *-- Browse Presentation Server
      PERFORM f1000_browse_presentation_file.
    FORM f1000_browse_presentation_file .
      CONSTANTS: lcl_path TYPE char20 VALUE 'C:\Migration Files\'.
      CALL FUNCTION<b> 'WS_FILENAME_GET'</b>
        EXPORTING
          def_path         = lcl_path
          mask             = c_mask  "',.,..'
          mode             = c_mode
          title            = text-006
        IMPORTING
          filename         = p_f1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
        MESSAGE s000 WITH 'No file Selected'.
        flg_pre = c_x.
      ENDIF.
    ENDFORM.                    " f1000_browse_presentation_file
    *&      Form  f1001_browse_appl_file
          Select file from Application Server
    FORM f1001_browse_appl_file.
      DATA:  lcl_directory  TYPE char128,
             lcl_file       TYPE char10.
      lcl_directory  = p_direct.
      CALL FUNCTION <b>'/SAPDMC/LSM_F4_SERVER_FILE'</b>
        EXPORTING
          directory        = lcl_directory
          filemask         = c_mask
        IMPORTING
          serverfile       = p_f2
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
       MESSAGE e000(zmm) WITH text-039.
       flg_app = 'X'.
      ENDIF.
    ENDFORM.                    " f1001_browse_appl_file
    *&      Form  f1003_pre_file
          Open Presentation Server file
    FORM f1003_pre_file .
      DATA: lcl_filename TYPE string.
      CONSTANTS: lc_codepage(3) TYPE c VALUE 'IBM',        " Code page
                 lc_filetype    TYPE char10 VALUE 'ASC'.
      lcl_filename = p_f1.
      CHECK p_f1 IS NOT INITIAL.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lcl_filename
          filetype                = lc_filetype
          has_field_separator     = c_x
        TABLES
          data_tab                = i_reg_grp
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    <b>Reward points if this helps.
    Manish</b>

  • How to get uploaded file name and path in BefExportToDat event script

    I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
    - The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
    - The API variable RES.PstrFilename is returning nothing
    I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
    Please let me know how this might be achieved.

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

  • 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 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();

  • Display file name and remove error from log output

      This script is working great from the GUI but when I call it from a cmd file from a job scheduler it throws out errors. I also want to display from is location the file name and it's byte count(ForEach($File in $Files)) so I can tell if any of the
    files being combined where actually empty. It wants to search the current location from the sever not just-Locations parm..
    Error message in LOG file:
    Get-ChildItem : Cannot find path 'F:\powershell\-SearchFor' because it does not
     exist.
    It's trying to find file install.cmd from where script starts and all the -Locations(which is only the search parm)
    Function Search-Files{
    Param([String[]]$Locations, $SearchFor, $AppendTo)
    Begin
    If(-Not (Test-Path $AppendTo)){New-Item $AppendTo -ItemType File -Force}
    Process
    ForEach($Location in $Locations)
    $Files = Get-ChildItem -Path $Location -Filter $SearchFor -Recurse
    ForEach($File in $Files)
    Get-Content -Path $FIles.FullName | Out-File $AppendTo -Append
    End{}
    Search-Files -Locations "\\Server1\c$\Temp", "\\Server1\c$\Test1" -SearchFor "Install.cmd" -AppendTo "C:\Temp\Search.log"
    Thanks.

     I search multiple shares to find a common file name then create a single output file. I will be doing this search and file creation
    for 5-10 different file names. If there is a better way .. certainly open for suggestions. It's working but having issue with
    the cmd file for every file and folder I check. It puts this error out for each run of the process.
      Error message in LOG file:
    Get-ChildItem : Cannot find path 'F:\powershell\-SearchFor' because it does not exist.
     Thanks.
    I tried your code with little changes and saved in Temp folder.
    My CMD file has the below code
    PowerShell C:\Temp\Untitled1.ps1
    It worked.
    Regards Chen V [MCTS SharePoint 2010]

  • Adding file name and file full path to a page

    Hi all I'm new to scripting
    What I want to do and don't know how to go about it is to run a script that collects the saved file name
    and the full path where the file is saved on the network and displays it on my document
    If any one has done something similar or if some one can help me create it it would be appreciated
    Thanks Gabriel

    var idoc = app.activeDocument;
    var itext = idoc.textFrames.add();
    var file = idoc.fullName;
    itext.contents = file.fsName;

  • Get file name and path from  adf inputFile

    Hi,
    I use adf's inputFile component. I need to get the file name and filePath. Does anyone knows how to do that?
    Thanks in advance

    You may bind the value to an UploadedFile object and get the name from this object.
    You may use a valueChangeListener backin bean method or a managed bean.
    Here the code i just write for something similar. Note that i'm not able to test it because of a bug in 10.1.3.1 with inputFile and web.xml parameters. I still waiting for the patch.
    public void uploadedFile(ValueChangeEvent valueChangeEvent) throws IOException,
    Exception {
    final int BUFFER = 2048;
    byte data[] = new byte[BUFFER];
    int currentByte;
    String fileName;
    UploadedFile uploadedFile =
    (UploadedFile)valueChangeEvent.getNewValue();
    if (uploadedFile != null) {
    String mimeType = uploadedFile.getContentType();
    if (mimeType == "application/x-zip-compressed") {
    // get the uploaded file as a zip file
    ZipFile zipFile = new ZipFile(uploadedFile.getFilename());
    // verify the zip archive contains only one entry
    if (zipFile.size() != 1) {
    FacesContext context =
    FacesContext.getCurrentInstance();
    ResourceBundle errorMessage =
    ResourceBundle.getBundle(context.getApplication().getMessageBundle());
    Exception ZipFileContentException =
    new Exception(errorMessage.getString("error.fileUpload.zipFileContent.moreThanOneEntry").replace("{0}",
    String.valueOf(zipFile.size())));
    throw ZipFileContentException;
    // get the entries in the zip file even it is only one
    Enumeration zipFileEntries = zipFile.entries();
    // Process each entry
    while (zipFileEntries.hasMoreElements()) {
    // grab a zip file entry
    ZipEntry entry =
    (ZipEntry)zipFileEntries.nextElement();
    // check the entry is not a directory
    if (entry.isDirectory()) {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.zipFileContent.isDirectoryInsteadFile"));
    throw ZipFileContentException;
    File destFile = new File(entry.getName());
    Magic magic = new Magic();
    // getMagicMatch accepts Files or byte[],
    // which is nice if you want to test streams
    MagicMatch match = magic.getMagicMatch(destFile, true);
    if (match.getMimeType() != "application/xml") {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    match.getMimeType()));
    throw ZipFileContentException;
    //TODO get the repository directory from classification-param.xml
    BufferedInputStream is =
    new BufferedInputStream(zipFile.getInputStream(entry));
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) !=
    -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    zipFile.close();
    } else if (mimeType == "application/xml") {
    String currentEntry = uploadedFile.getFilename();
    File destFile = new File(currentEntry);
    BufferedInputStream is =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fos = new FileOutputStream(destFile);
    BufferedOutputStream dest =
    new BufferedOutputStream(fos, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = is.read(data, 0, BUFFER)) != -1) {
    dest.write(data, 0, currentByte);
    dest.flush();
    dest.close();
    is.close();
    } else {
    Exception ZipFileContentException =
    new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
    mimeType));
    throw ZipFileContentException;
    }

  • 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

  • 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

Maybe you are looking for