J0ker Posted March 1, 2007 Share Posted March 1, 2007 I want to make a test at the beginning of my script to see if all the files are in the folder. Wich command should I use to run a test and check if the desired file is in the folder? I do not want to open the file but just check if all the files are there. Shellexecute + return? Link to comment Share on other sites More sharing options...
Helge Posted March 1, 2007 Share Posted March 1, 2007 FileExists ? Link to comment Share on other sites More sharing options...
J0ker Posted March 1, 2007 Author Share Posted March 1, 2007 (edited) Thanks helge it work! Is there a way to make a protection? Ex: I have a file named Readme.txt. I made this to make sure the file is in the folder. If FileExists(@SCRIPTDIR & "\Readme.txt") Then Else MsgBox(0,"Directory Error","Cannot find Readme.txt") Sleep(50) Exit EndIf If the user delete MY readme.txt and make another readme.txt, it will work too. Is there a way to prevent that to make sure that only my readme will work. Edited March 1, 2007 by J0ker Link to comment Share on other sites More sharing options...
iceberg Posted March 1, 2007 Share Posted March 1, 2007 well, you may wish to have your program check on the following: 1) Search for "certain" data in the txt file 2) Compare filesize mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
J0ker Posted March 1, 2007 Author Share Posted March 1, 2007 (edited) Searching for a certain data will be the easiest way I think. Thank you! Edited March 1, 2007 by J0ker Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now