| 1. |
Solve : Mistaking In Batch? |
|
Answer» Hi Every 1 And Specially I wanna know After inserting Yes or no How 2 delete all Files in same folder If you're going to delete files whether the answer is yes or no, why bother asking? >:(Hey SideWinder You Dont Know Something about Ur-Self U R THE BEST!!!!! Thanks For The Help! I Wish You A Long Life Thanx For The Help Topic Closed Quote from: Sidewinder on January 29, 2010, 06:22:35 AM
Or in other threads "COMPUTER Experts" check to see if a certain file exists? If the file does not exist, the the OS will report that! Why check? If we try to create a file and it already exists, the OS will not allow it. So why go through the above procedure? A waste of time.Quote from: BillRichardson on January 29, 2010, 09:39:21 AM Or in other threads "Computer Experts" check to see if a certain file exists? If the file does not exist, the the OS will report that! Why check? If we try to create a file and it already exists, the OS will not allow it. So why go through the above procedure? A waste of time. checking to see if a file exists is a good idea if you plan to read from the file. If the file exists, you read the values from it; otherwise, you use the default values. If you don't check and INSTEAD blindly try and read, the values will not have the intended default values. Or, in the case of an actual windows program, you'll crash when you try to use a file handle that doesn't exist (createfile will return -1 and getlastError() will be 2) and unless you check the handle (which is basically checking if the file exists, which as you've said we shouldn't be doing) then you'll try to read or write to a file handle of -1, which is not valid.Quote from: BillRichardson on January 29, 2010, 09:39:21 AM Or in other threads "Computer Experts" check to see if a certain file exists? If the file does not exist, the the OS will report that! Why check? If we try to create a file and it already exists, the OS will not allow it. So why go through the above procedure? A waste of time. Please explain more. The OP is deleting files, not creating them and is using a wildcard. The OP simply WANTS to empty a directory. Quote from: the_mad_joker on January 29, 2010, 01:43:59 AM And Specially I wanna know After inserting Yes or no How 2 delete all Files in same folder Quote from: Sidewinder on January 29, 2010, 06:22:35 AM If you're going to delete files whether the answer is yes or no, why bother asking? The question remains. If the logic is to delete the files no matter what the response to the prompt is, why bother with the prompt at all? PS. This is how threads turn into 5 page marathons that have nothing to do with anything.. The OP never mentioned creating files or reading from files. I have a headache... |
|