LAE

 View Only

Read a directory and set variables?

  • 1.  Read a directory and set variables?

    Employee
    Posted 05-09-2019 06:49

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: StaticFX

    New to Lavastorm

    Wondering if there is a way to do this..

    I have a directory with some files..
    most of the file names dont change so thats easy..
    a few change part of the name each day

    is there a way to scan each file name, then split apart the filename to then set a variable (or somehow set that as the file to import?)

    ImportFile_Modified_xxxxxxxxx.csv

    So I need to:
    Scan the directory
    When it finds a file with partial name "ImportFile_Modified_" grabs it and then remembers the number
    Imports that file
    Creates a directory using that number
    Outputs a file using that number

    lol is it possible?


    Thanks!