Giter VIP home page Giter VIP logo

work-12's Introduction

work-12

Renaming file based on file content at a particular location

Input

The input task is as follows:

Work-12 Input

  • There are multiple files generated from DIA Equipment with filename as random number.
  • The following parameters in the input file are to be extracted:
    • LotID
    • StepID
    • ResultsID
    • WaferID
    • DeviceID

Output

The output is as follows:

Work-12 Output

  • The random named files will be renamed w.r.t nomenclature as <lot_id>_<step_id>_<wafer_id>. E.g: F19310002.F1_POLY_WF01
  • The modified & renamed files will be moved from src to dest directory i.e. <device_id>/<step_id>/<lot_id>/YEDI1/
  • Also, the following parameters of the respective file is changed:
    • LotID
    • ResultsID

Coding

The pseudo code is as follows:

  1. Walk in directory of the input files i.e. source directory.
  2. Open the files (in read mode) with (*.001) extension (if available) in the given directory. E.g. "./data"
  3. Extract the respective parameters information - lineno, values,
  4. Modify the params - output_filename, new_deviceid, new_resultsid
  5. Write it back inside the file
  6. Create the folder(s) with deviceid, lotid, stepid, if doesn't exist.
  7. rename & move the files from src to des location. Use this func: os.rename(src, des)
    • Use try & except exception handling in order to check if the modified file already exists.

Testing

  • Case-1: simply put the data files into "./coding/data"
    • Here, the files should be moved from src to des
  • Case-2: put the data files into "./coding/data", but don't delete the new folder, subfolders & the set of moved files
    • Here, run repeatedly to see if there is any subfolder being created inside the "device" folder e.g. 'F19010001.F1POLY', 'F19010001.F1POLYPOLY'
  • Case-3: put the data files into "./coding/data", but delete the moved files from dest directory.
    • This moves the modified & renamed file into the destination directory.

Demo

The demo video is available here [to be modified as per v0.2]

work-12's People

Contributors

abhi3700 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.