Jump to content

Recommended Posts

Posted

Hello,

i have a directory with about  50 .csv files.

I want to delete last row for each of them.

Can you suggest a script that automate this action? Is it possible?  

My best alternative is to do this manually one by one.

Thank you

Posted

You can get a list of all .csv file using _FileListToArray.  For each file, you can dump the content into an array with _FileReadToArray.  Delete last row of the array with _ArrayDelete and rewrite the file with _FileWriteFromArray.  A few line of code, not very complicated.  Try this out and come back with your code if you face an issue.

Posted

Did you search the forum?
There are a lot of threads discussing this issue.
Example:

 

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...