|
-
Apr 5th, 2010, 07:26 PM
#1
Continuing loop
I've set up a basic loop to delete all the files in a particular folder. I've set the loop in a Try block so it doesn't crash the application when it gets to a file it can't delete.
I'd like for the app to just pass over these type of files. At the moment, my loop stops completely when it gets to that exception.
Can anyone provide me with any general information on how to accomplish? I thought this would be pretty straightforward so I don't think it will require me to post any code, but I can if needed.
Thanks
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Apr 5th, 2010, 09:03 PM
#2
Re: Continuing loop
Your mistake is this:
I've set the loop in a Try block
It should be the other way around. Once the Try block completes you want the loop to continue, therefore the Try block must be inside the loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|