I've got a simple table with an ID, a NAME and an ARCHIVE booleen.
I want to write piece of code that goes through each record and...
If ARCHIVE is false and a folder hasn't been created for it, it will create it and go to the next record.
If ARCHIVE is false and a folder has been created for it, it will do nothing and go to the next record.
If ARCHIVE is true the whole folder will be moved to another folder and go to the next record.
When all records have been checked, the code will end.
I was thinking of using a SQL count to find out how many records there were and making a loop that starts at record one. runs the folder checking/creating/archiving code then +1 until the loop ends but I couldn't work out how to assign the query results to an integer...
I'm not asking for anyone to write the code. I think I probably already know 80% of the theory behind doing this I just can't glue it all together. I know you can do the folder stuff with the System.IO Directory Class...
Anyway, all input is welcome. Cheers guys!
View Complete Post