How to Read file name which we are dealing with ODI File tool

Hi,
We are using ODi10g version and we have requirement to move file from one place to another place. We are using ODIFileMove utility but we also want to read file name.
Any help.
Thanks in Advance.

You can accomplish this with a fairly simple Jython script.  Use the os.listdir(<directory>) command to get the name of files in a given directory. 
You can then (still in the Jython script) loop through the files and move them to a desired location (bypassing the OdiFileMove tool) OR use the Jython script to write the file names to a SQL table.  Then, use an ODI procedure to loop through the newly inserted records and store the file name in an ODI variable that you can then use in your OdiFileMove tool etc.
I often refer to this blog entry from Gurcan Orhan as a starting point for this kind of task: Loading multiple files with ODI | Gurcan Orhan&amp;#039;s Oracle Data Integrator Blog

Similar Messages

  • Can we get file name which we are compiling in java program

    Hi,
    I want to know if we can get filename(when compiling) or jarfile(when running) which we are compiling in the program itself.
    EX:java -jar myjar.jar
    How can I display jar file(i.e myjar.jar) in my program
    ex:sop("file which compiled is:"<filename>);

    can you rephrase the question in english, please!!

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How to change the excel file name which is in Application server...

    hi friends,
    my requirement is getting failed, when i'm trying to change the file name which is in Application server using the FM: SXPG_COMMAND_EXECUTE.
    when i execute above FM, i can see all my required details in SM69 like:
    COMMAND NAME: ZSPOOL_TEST1      
    OS: Windows NT
    TYPE: Customer 
    OS COMMAND: cmd rename Y:\OBRZ.PDF OBRZ38582.PDF
    once the above FM is executed, i'm getting SY-SUBRC = 2 (exception: COMMAND_NOT_FOUND).
    so, can any one guide me how to resolve this issue or is there any other way to rename the file which is in AS?
    thanks in advance...

    Hi ,
    First you can tranfer the AS server file to a new application server file.
    Then you delete the original file .
    To do that you can write code as follows --
    DATA : w_file(8) TYPE c VALUE 'FILE_NAM', " your present AS file name
           w_new(8) TYPE c VALUE 'NEW_FILE',
           fs_itab(255) TYPE c,
           t_itab LIKE TABLE OF fs_itab.
    OPEN DATASET w_file FOR OUTPUT IN BINARY MODE.
    DO.
      READ DATASET w_file INTO fs_itab. " Reading value from the AS file to field string
      IF sy-subrc NE 0.
        EXIT.
      ELSE.
        APPEND fs_itab TO t_itab. " Populating internal table form the file value
      ENDIF.
    ENDDO.
    OPEN DATASET w_new FOR INPUT IN BINARY MODE. " creating a new file if that does not exist
    LOOP AT t_itab INTO fs_itab.
      TRANSFER fs_itab TO  w_new. " Transfering to file
    ENDLOOP.
    CLOSE DATASET w_file..
    DELETE DATASET w_file. " Dleting the old file
    CLOSE DATASET w_new.  " Closing the final file
    Regards
    Pinaki

  • How to read the name of .csv file from a particular folder using Oracle.

    Gurus,
    I have a folder called 'data_dir' in Oracle Server and it contains 10 different .csv files and the name of the each file is being suffixed by date and time(24 hrs format).
    First i need to read all the file names then i have to process those files by UTL_FILE to load the data into a relational table.
    Is there any mechanism is available in Oracle to read the file names?
    (In this case all the 10 different csv file names)
    If so, then please help me accomplish this.
    Thanks in advance.
    Regards,
    Venugopal.K

    Is there any mechanism is available in Oracle to read the file names?Sounds to me like you need to use External Tables (*not* utl_file).
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/et_concepts.htm

  • Error writing file name which contain both English and non-English name

    Hello
    I have this simple vbscript code which suppose to write all file names in some directory to a text file
    Dim FSO
    Dim FileDirectory
    FileDirectory = "C:\temp"
    Dim FileList
    FileList = "list.txt"
    Dim Fname
    Set FSO = CreateObject("Scripting.FileSystemObject")
    set FileDirectory = FSO.GetFolder(FileDirectory)
    Set objFile = FSO.CreateTextFile(FileDirectory & "\" & FileList ,True)
    for each file in FileDirectory.files
    Fname = file.name
    objFile.Write( ChrW(34) & Fname & ChrW(34) & vbCrLf)
    objFile.Write( ChrW(34) & FileDirectory & "\" & Fname & ChrW(34) & vbCrLf)
    Next
    objFile.Close
    Everything goes fine while file names are in English but when some file name is non English or both  English with non English name (right to left languages) an error raised, so how to deal with this writing issue without changing the file name
    thanks in advance

    Thanks
    jrv for replying
    I tested you code but it didn't worked for me (works fine for English file names but doesn't work with right to left language )

  • TFS Build Error - Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

    I am trying to set-up CI of Orchard CMS and deploy it on Azure using TF service. I am stuck at following error for path being
    longer than 260 characters. However, when counted the total characters in path are 235. Please see the below error :
    Other Errors and Warnings
    1 error(s), 1 warning(s)
    Exception Message: TF400889: The following path contains more than the allowed 259 characters: drop/_PublishedWebsites/Orchard.Web_Package/Archive/Content/C_C/a/src/projects/Orchard/dev/DevAltaf/Orchard/src/Orchard.Web/obj/Debug/Package/PackageTmp/Modules/BrentApart.BannerManager/Scripts/controllers/bannerAssignmentController.js. Specify a shorter path. (type VssServiceException)
    Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.EndCopyDirectory(IAsyncResult result)
    at Microsoft.TeamFoundation.Build.Workflow.Activities.CopyDirectory.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
    at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
    Inner Exception Details:
    Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)
    Did anyone came across such issue while deploying Orchard on Azure with TF service? If yes, how did you sort this freaking error?
    Thanks,
    Altaf B.

    Hi AltafB,
    For your situation, you can short the path for the source code. Or use a short path for build agent folder in your build definition. You can refer to the links below to solve your problem:
    http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/1638a5f0-9321-4ff9-9ee7-6d347badb972/please-some-solution-to-the-specified-path-file-name-or-both-are-too-long?forum=tfsbuild
    Besides, since you deploy Orchard to Azure, you can also publish it directly using publish profile in Visual Stduio or WebMatrix directly.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi, Im trying to get the whole path in my server, so i tried that with this following code
    Get-ChildItem $sourceFolder  -Recurse | ?{$_.PsIsContainer} |Get-Acl
    But then, it showed me somtehing like this :
    Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     I tried to find the solver everywhere and mostly they propose to change the path name, which is impossible, since I am working with my company server, and those folder have already there before i start to work here, then the other ask me to use robocopy,
    but all of the trick just dont work
    is there any way to solve this problem? thanks

    There is no simple solution to this. And it is not a limitation of powershell itself, but of the underlying NTFS file system.
    If the problem is that a folder with a name longer than 248 exists anywhere within your directory structure, you are hooped.
    If the problem is that some fully qualified path names exceed 260 characters, then, in those cases, the solution already given is to create a psdrive partway up the path from the drive letter or server/share root of the path. Unfortunately, the output produced
    will be relative to that psdrive and not to what is specified as the $sourcefolder.
    unless you already know where those problematic paths are, you might consider trying to trap those errors and have your script figure out where it needs to create psdrives. You might then be able to calculate the equivalent path for each file or folder and
    output that. the programming effort would be simpler to just created a psdrive for each folder encountered, however I expect that would be very inefficient.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • How do i find out which computers are authorized?

    How do I find out which computers are authorized?

    Log into iTunes from your desktop. (Sign in upper right corner of iTunes page.)
    On your user name/e-mail (upper right corner) use the drop down menu and select account.
    Select manage your devices.
    That's it folks ....

  • My computer says I cannot use icloud because I have multiple versions of outlook installed. How do I find out which versions are installed and how do I decide which one to delete?

    My computer states that I have multiple versions of outlook installed and that i cannot use icloud. How d if find out which versions are installed and which ne to delete without interrupting the other?

    That's a Windows/Office problem. You should ask in the Microsoft support forums.

  • SharePoint 2010, Visual Studio 2010, Packaging a solution - The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi,
    I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
    <Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
    to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
    I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
    I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
    renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
    Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
    error logging. So we created another project in Visual Studio called:
    <Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
    And this is when the error has come back and bitten me! The scenario is now as follows:
    1. project1 packages and deploys successfully with long feature names and deep paths.
    2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
    I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
    1. By doing the following I can get project2 to package
    In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
    Clean the solution
    Shut down Visual Studio 2010
    Open Visual Studio 2010
    Rebuild the solution
    Package the project2
    et voila the package is generated!
    This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
    no longer be hanging onto something.
    Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
    solutions on a Build Server using automated builds.
    2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
    3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
    does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
    4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
    from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
    5. DebugView shows nothing useful during the build and packaging of the project.
    6. The error seems to occur in
    CreateSharePointProjectService target called at line 365 of
    Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
    project2 completely and recreate it and introduce it into my Visual Studio solution.
    Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
    Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
    project etc... and is actually workable in a meaningful Visual Studio solution.

    Hi
    Yes, I thought I had fixed this my moving my solution from the usual documents  to
    c:\v2010\projectsOverflow\DetailedProjectTimeline
    This builds ok, but when I come to package I get the lovely error:
    Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
    Now, the error seems to be related to 
    Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
    <metaData>
    <type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
    <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="Title" type="string">VisualProjectTimelineWebPart</property>
    <property name="Description" type="string">My Visual WebPart</property>
    </properties>
    </data>
    </webPart>
    </webParts>
    .... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
    Daniel

  • How can I know in which Tables are the fields stored

    Hi,
    In transaction FSE3 Display Financial Version
    Statement Version, if I drilldown in details, I can
    see Item No, Chart of Acc, From Accountm To Account D,
    C.
    when I do a F1 on the fields, I can see that it is a
    structure. How can I know in which Tables are the
    fields store?

    Hi Ankit,
    There are no rules or guidelines for finding the table but i will share some of the tips used generally.........but i am not sure if we can do it for a tree structure..but try anyways....
    Double click on the structure name seen on the F1 pop up window...
    in the structure screen, try to analyse the field which is very important something like a key in that set of fields or do the same for the fields which we feel are more important,then click on the domain for that field....once in the domain..click on the "where used list for the domain" on the top...
    it will display a pop up -> select only "table" and then press "Tick/OK"..A list will be displayed with the data element and table name ..from this we need to find out the right one we need either by going for text of the table or going through each and every one
    It takes time but does the job.....
    Regards
    Byju

  • Powershell Get-childItem: The specified path, file name, or both are too long.

    Hey Scriping Guys!
    I've been using a PowerShell script for a couple of years now to generate a monthly report showing the size of user folders on a number of departmental file servers.  It's working just fine on all file servers except one where the users have gotten carried away with creating sub-folders and using realy long descriptive file names.  The problem piece of script is this:
    $colItems = (Get-ChildItem \\192.168.10.5\marketing -recurse | Measure-Object -property length -sum)
    "marketing-serv\marketing: "+"{0:N2}" -f ($colItems.sum / 1GB) + " GB"
    The reply I get is:
    Get-ChildItem : The specified path, file name, or both are too long. The fully
    qualified file name must be less than 260 characters, and the directory name mu
    st be less than 248 characters.
    At G:\data\Server_space_Report\serverspace2.ps1:37 char:27
    + $colItems = (Get-ChildItem  <<<< \\192.168.10.5\marketing -recurse | Measure-Obje
    ct -property length -sum)
    Yes, the message is correct, however, when I connect to the server, right click the folder and chose properties it returns a size of 128 GB.  My questions are
    1. Why does clicking on folder properties not produce an error (what is it doing differently from my script)?
    2. How can I fix my script?
    Thanks,

    I am trying to clear up the older open posts on this forum. If this is still an unresolved issue for you please let me know. If you do not post back within one week I will assume it is resolved and will close this thread.
    Thank you
    Ed Wilson
    Microsoft Scripting Guy

  • How do I find out which instruments are used by software instrument loops?

    This isn't so much a problem, it's just something that's been bugging me - how do I find out which instruments are used by the software instrument loops?
    Usually clicking on a track will bring up the instrument name in the track info pane, but if I do this after importing a software instrument loop into my song it doesn't show anything. Any ideas?
    PS I have used the search function so I apologise in advance if there's an obvious answer.

    in track info, under details, the instrument being used is displayed in the generator popUp menu

  • HT1420 How do I find out which computers are authorized to my Apple ID?

    How do I find out which computers are authorized to my Apple ID?

    lmoscoso wrote:
    How do I find out which computers are authorized to my Apple ID?
    You cannot.
    Some people wish there was a way to print out a list of authorized computers that would look like "Suzy's laptop,  Dad's Macbook, and the desktop we threw away last year."  But there is no way to do so.
    It is especially confusing, since a single machine may be using up multiple authorizations.  Also, authorizations may be used up by machines that do not even exist any more.
    If you are at the limit, you can use the Deauthorize All command,  and then reauthorize just the ones you need.

Maybe you are looking for

  • Save/open dialog box for FileWriter

    Hi, I have a JSP action link with onclick='onClickExport', defined in an underlying class file. The 'onClickExport' method in the class creates a file: fileName = "C:\\Temp\\SaveSearchResults.csv";      File outputFile = new File(fileName);      File

  • Need Help - Problem while having a panelformLayout inside a Region.

    I have a jspx page which has some regions out of which one region has a panel form layout in it's corresponding jsff. Below is my jspx <?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="ht

  • Brush Problem in Elements 8

    I am upgrading to Elements 8 from an earlier version on my Mac. The problem I have encounterd is that when I use brushes for painting or erasing the effect does not extend to the full size of the brush tip outline on the screen. For example, if I sel

  • Cannot open file, plug in error

    Cannot open file error message in InDesign software. PLEASE HELP!!!! Does not support file format, a plug in that supports the file format may be missing. can anyone help with this please??

  • AE CS3 hanging during rendering?!

    When rendering(sometimes?!)it hangs. Looking at the processes though they're still ticking over. I have a Quad Extreme Xeon and discovered when it is rendering there are 4 processes rendering, if I kill one (when it hangs) the rendering usually kicks