I have 7300 *.csv files in a temp directory. I want to zip these into a zip archive in R. I'm using the following code, which is taking FOREVER. Is there a way to do this faster, short of exiting R and using the WinZip program?
fileListing = list.files( pattern = '*.csv' )
outZipFileName = gsub( '.zip', '_TZflts.zip', zipName )
sapply(seq_along( fileListing),function(ii) zip( outZipFileName, fileListing[ii] ) )
Another problem is that the zip process in the code spawns tons of garbage files, besides the zip file and its csv contents.
Thank you.
BSL