Ulisses Ramos Posted August 28, 2011 Share Posted August 28, 2011 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 More sharing options...
AKJV Posted August 29, 2011 Share Posted August 29, 2011 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 More sharing options...
Ulisses Ramos Posted August 29, 2011 Author Share Posted August 29, 2011 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 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 More sharing options...
Kerm Posted August 29, 2011 Share Posted August 29, 2011 Search php delete function after include code on admin panel page and after import just press link or button and file will delete. Don't forget made chmod 777 on import folder. Link to comment Share on other sites More sharing options...
Ulisses Ramos Posted September 23, 2011 Author Share Posted September 23, 2011 Thanks for the tip. I´ve look into this, (unlink function) but i don´t know how to use the name from that pull down menu where we choose the file to import into a code to delete that choosen file Link to comment Share on other sites More sharing options...
Recommended Posts