Created
          May 28, 2019 13:58 
        
      - 
      
- 
        Save rjriel/3e88e34506d59b98037ae12972709af8 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const fs = require('fs') | |
| const path = require('path') | |
| require('dotenv').config() | |
| const { dataFile, saveDirectory} = process.env | |
| while(true) { | |
| try { | |
| fs.renameSync(dataFile, path.join(saveDirectory,`${Date.now()}.csv`)) | |
| } catch(e) {} | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment