Computer Science Canada File In Use |
Author: | uberwalla [ Tue Dec 19, 2006 6:59 pm ] |
Post subject: | File In Use |
Hey I was just wondering if there is a way to tell through turing if there is a file in use. just to give an example of what i mean. You go to delete your c:/ drive but and then it stops and says file in use. is there a way to tell if a file is/ isnt in use? |
Author: | ericfourfour [ Tue Dec 19, 2006 7:43 pm ] | ||
Post subject: | |||
Since you cannot delete a file that is in use this program might do the trick. This is straight out of the manual at File.Delete.
|
Author: | uberwalla [ Tue Dec 19, 2006 7:49 pm ] |
Post subject: | |
ok thx. i think that works ![]() ![]() |
Author: | uberwalla [ Tue Dec 19, 2006 7:53 pm ] |
Post subject: | |
ok sorry for double post but for some reason the help section (of all forums ![]() ![]() anyways when u said skip was an actual command so i looked it up in reference to get its actual definition in full. my question is: if i were to delete many files at once using turing; this say: 1.txt, 2.txt, and 3.txt if 1.txt was in use would the skip command tell it to skip to the next file (2.txt)? because in skips definition it says that it just skips a line. like the "/n" in front of text in quotations does. thx. |
Author: | Clayton [ Tue Dec 19, 2006 8:09 pm ] |
Post subject: | |
No, skip would not skip that file. Like the help manual says, it simply skips a line in the run window. If you wanted to skip a file, just use an if statement. |
Author: | uberwalla [ Tue Dec 19, 2006 8:20 pm ] |
Post subject: | |
thats the problem i dont know how ![]() is there a command that skips a file? like if filename = inUse then File.Skip (filename)????? end if it doesnt work but ![]() ![]() ![]() |
Author: | Tony [ Tue Dec 19, 2006 8:31 pm ] |
Post subject: | |
you just have to catch the error / exception, and continue on with the loop |