This a followup to these two threads:
http://www.daniweb.com/software-development/java/threads/438729/recursive-ftp-listingmakingcreatingetc-access
http://www.daniweb.com/software-development/java/threads/439941/recursive-ftp-listingmakingcreatingetc-access...-part-2
For the "real thing" Ive decided to break it to two function: Insert file and make directory.
Ill reexplain what I am trying to do.
Im going to go a folder called "webfolder".
If it isnt found, it is created.
If it is found and a folder with the current date isnt isnide of it, a folder is created inside with the current date (a folder inside webfolder would be created called 12042012).
If that folder with the current date exists,
if there is more than 44 files inside,
then a second folder inside of webfolder would be created instead with a number (a folder inside webfolder would be created called 12042012_1 instead).
if it the folder with the current date does not have more than 44 files inside, a bmp file with a generated random num is created and then folder with that same num is created (so inside of webfolder and inside the current date foler, another folder with a generate random num). Inside this folder two files will be created.
The good news is that the code works 99.9% :) So thats reliving. The bad news is that when it detects that 44 limit, it puts it in the wrong place....
Its something like:
C:
------> webfolder
----------------->currentdate
--------------------------------------------->randomnumber
---------------------------------------------------------->file1
---------------------------------------------------------->file2
----------------------------->randomnumberbmp
--------------------------------------------->randomnumber1
---------------------------------------------------------->file1of1
---------------------------------------------------------->file2of1
----------------------------->randomnumber1bmp
--------------------------------------------->randomnumber2
---------------------------------------------------------->file1of2
---------------------------------------------------------->file2of2
----------------------------->randomnumber2bmp
etcetc
--------------------------------------------->randomnumber43
---------------------------------------------------------->file1of43
---------------------------------------------------------->file2of43
----------------------------->randomnumber43bmp
----------------->currentdate1
----------------------------->file1of44
----------------------------->file2of44
--------------------------------------------->randomnumber45
---------------------------------------------------------->file1of45
---------------------------------------------------------->file2of45
----------------------------->randomnumber45bmp
--------------------------------------------->randomnumber46
---------------------------------------------------------->file1of46
---------------------------------------------------------->file2of46
----------------------------->randomnumber46bmp