Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Rename variable file name

  1. #1
    Join Date
    Oct 2014
    Posts
    2

    Default Rename variable file name

    I have a file that I receive which includes a date/time stamp.

    I ultimately want to unzip the file, but have had issues renaming a file with a variable filename. Because of this issues, I've tried to rename the file to a standard filename. Any ideas?


    Example:
    File received yesterday: data.201506051923.zip
    File received today: data.20150606205312.zip
    etc.

    I either want to unzip that file, or I want to rename the file I receive to data.zip.

    Any recommendations?

  2. #2
    Join Date
    Oct 2014
    Posts
    2

    Default

    I guess I could do it all via scripts....but that defeats the purpose.

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You only know parts of the ZIP filename, so let's hope you know the folder to search for files matching these known parts.
    You can search the folder using job entry Add-Filenames-To-Result or transformation step Get-File-Names depending on your overall design.
    It's not clear from your problem description if you really must unzip.
    Please note that Kettle is able to process files inside of a ZIP archive directly using VFS.
    So long, and thanks for all the fish.

Tags for this Thread

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.