Hi,
I have a simple scenario. I will explain it step by step
I want to create a task which looks into a folder which contains many .csv files.
The task has to loop through all the files.
When it detects a .csv file which is 2400 KB it will split the file into two separate files. Each new file is 1200 KB each.
is this scenario possible?
Please help
Thank you
SPLITTING very large file
SPLITTING very large file
Last edited by ganapkg on Sun Dec 17, 2006 12:31 am, edited 1 time in total.
SPLITTING very large file
You can take as basis this example. This task splits CSV files by 30 lines.
You may make such changes
1. Increase the amount of lines from 30 to 3000 (for example). It depends on average length of string
2. Insert the checking of file size before splitting
See the following algorithm:
File loop
if {FileSize({SOURCE_FILE})}>2400000 then
....
split the file
....
else
copy file as is
end if
end loop
You may make such changes
1. Increase the amount of lines from 30 to 3000 (for example). It depends on average length of string
2. Insert the checking of file size before splitting
See the following algorithm:
File loop
if {FileSize({SOURCE_FILE})}>2400000 then
....
split the file
....
else
copy file as is
end if
end loop