Jump to content

Delete CSV file after import


Recommended Posts

Is there a way to delete the CSV from the admin/import/ after import? I have a lot of products with images, so i have to split the csv in a lot of files. around 250 products per csv or else i get server timeouts. As i have presently arout 2700 products i have 12 csv files to import. To prevent me from importing the same file 2 or 3 times or missing one i would like to add a line to the import "routine" to delete e csv imported file after update.

Link to comment
Share on other sites

I assume that you upload your CSV files via FTP, so then you can also delete your files via FTP once they are imported.

 

In addition, you can number the CSV files, e.g. products_import_1.csv, products_import_2.csv, etc.

 

My advice would be to upload your numbered CSV files in batches (3 or 4 at a time), import them, delete them and continue with the next batch.

 

As far as I know, automatic deletion of files after import is not possible without tinkering with the code of AdminImport.php in your admin/tabs folder. And I wonder if that's worth doing since you only have to import your initial product catalogue once.

 

Still, maybe someone else can help you out who has proper PHP coding skills for implementing automatic file deletion after import...

Link to comment
Share on other sites

yes.. the csv are uploaded by ftp. They are named like this "csv_0001-0250","csv_0251-0500" and so on. The thing is that i would like to upload them all and everytime i successfully imported a file, them it would delete it from the store, so i don´t have to have a post it here and writing down the names of the files i already imported :P

 

yes... i was hoping for some hint on what to add to the php to do this :)

 

And from my actual 2700 products, about 900 have promotions every 3 weeks, so i have to import them with those new prices every 3 weeks.

Link to comment
Share on other sites

  • 4 weeks later...
×
×
  • Create New...