admin,
Super, thank you! It works, in log I see my data from my .csv file.
Some new questions appears:
1. My file in named: report-2021-05.csv Is possible to read data just from last received file named "report" , but not from all files? If any other files are located in this directory, script reads data from all of them.
Also is possible to start reading script just when new file appeared in FTP folder name started "report"?
2. Is possible somehow read date and time of file appeared in FTP folder?
3. How put data from received table to groups? In log data shown such way (just 2 rows shown from whole table):
FTP check 08.05.2021 17:25:19
* table:
[1]
* string: 0
[2]
* string: 1
[3]
* string: 322
[4]
* string: 2015.330
[5]
* string: 2202.530
FTP check 08.05.2021 17:25:19
* table:
[1]
* string: 0
[2]
* string: 1
[3]
* string: 322
[4]
* string: 6.900
[5]
* string: 6.900
4. os.remove(path) removes all files in my directory. I think I should add file name for path = dir .. '/' .. file. How can I do it? This way? : file = 'report*.csv' Can I use file mask here? (All files name started from report should be read and than deleted in this case?
5. If many files are in this directory, in which order files will be read by script above? Alphabetically?
BR,
Alexander
Super, thank you! It works, in log I see my data from my .csv file.
Some new questions appears:
1. My file in named: report-2021-05.csv Is possible to read data just from last received file named "report" , but not from all files? If any other files are located in this directory, script reads data from all of them.
Also is possible to start reading script just when new file appeared in FTP folder name started "report"?
2. Is possible somehow read date and time of file appeared in FTP folder?
3. How put data from received table to groups? In log data shown such way (just 2 rows shown from whole table):
FTP check 08.05.2021 17:25:19
* table:
[1]
* string: 0
[2]
* string: 1
[3]
* string: 322
[4]
* string: 2015.330
[5]
* string: 2202.530
FTP check 08.05.2021 17:25:19
* table:
[1]
* string: 0
[2]
* string: 1
[3]
* string: 322
[4]
* string: 6.900
[5]
* string: 6.900
4. os.remove(path) removes all files in my directory. I think I should add file name for path = dir .. '/' .. file. How can I do it? This way? : file = 'report*.csv' Can I use file mask here? (All files name started from report should be read and than deleted in this case?
5. If many files are in this directory, in which order files will be read by script above? Alphabetically?
BR,
Alexander