Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Get file name step changing to unix style path

  1. #1

    Default Get file name step changing to unix style path

    Hi,



    I have a very simple job that runs three transforms:-
    1. Sets the parameters passed in as globals
    2. Reads some more parameters from the db and sets these as globals
    3. Uses a couple of the globals to get all the filenames from a directory.

    The problem I have is in transform 3, when I use a variable in the "File/Directory" part Kettle is formatting the string to c:/bla/bla/filename.bla, when I hard code it back to c:\bla\bla\filename.bla its fine. I've attached a couple of logs to show what I mean, both show the variable being setup:-
    Set SPX_INTFC_CONST.0 - Set variable IMPOR_DIR to value [c:\ns\intf_dir\import]

    Hardcoded.log shows the file being picked up correctly:-
    [0] readSupFile.0 - Opening file: C:\ns\intfc_dir\import\msmsup.csv

    And variable.log shows the error when using the variable:-
    11:42:26,829 ERROR [FileInputList] FileInputList - org.apache.commons.vfs.FileSystemException: Could not list the contents of "file:///C:/ns/intf_dir/import" because it is not a folder.
    at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:527)
    Am using Kettle 2.5.1 on windows XP, has anyone seen this before, is there a switch I need to flick or am I missing a step somewhere?

    Many thanks,

    stevens_ns
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    There is nothing wrong with the forward slashes. On the contrary, you don't use backslashes in a URL.
    If there is a file called "file:///C:/ns/intf_dir/import" in a folder with the same name, I suggest you try to add a slash at the end of the URL.
    (or remove the file in question)

    Matt

  3. #3

    Default

    Hi,

    Thanks for the reply, I'd already tried adding the slash and the url stayed the same, but it made me look at it again and I realised I'd done something very dumb, all sorted now.

    Apologies for wasting your time, thanks again!

    nicole

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.