-
1 Attachment(s)
Please test this
Hello, I am just starting to learn to code in Visual basic, and I have a project I want to work on, but i want it tested, by another eye.
It's just a text file, in a .RAR
Please let me know ASAP.
It takes a Dropbox URL and gets a version and displays, then the application version.
And does a simple temp clean.
( FROM WHAT I KNOW ONLY, TIPS ARE APPRECIATED)
-
Re: Please test this
What are you suppose to do in-order to run the program, just paste the code into a new project or add a control (if so which control/s)?
Edit:
I receive an error:
Unable to open module file 'C:\Users\User\AppData\Local\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.vb': System Error &H80070002& C:\Users\User\AppData\Local\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.vb
and all that appears to happen when I run the project and click the command button is the message box appears informing me that the cache has been cleared.
-
Re: Please test this
Add a button, 2 labels. One named lblClient other lblServer. Copy & Paste the code, Erase everything in the code, and paste mine.
The error message is because you need .NET framework 4.0
Thanks.
-
Re: Please test this
I have .NET framework 4.0 installed.
Edit:
Nothing appears to be deleted from the Appdata/local/temp either.
-
Re: Please test this
Well I don't understand why it is not working for you, it works perfectly for me Windows 7 x64 bit.
Whats ure OS?
-
Re: Please test this
-
Re: Please test this
Well could you figure out whats wrong, any ideas?
Cause all it does it snag the SpecialDirectories TEMP ( %temp% )
Get's all files, and deletes them. I don't see an issue why it wouldent work?
-
Re: Please test this
So it's suppose to delete all the files/folders in the above directory?
Edit:
It will not work if the file you are trying to delete is open. You need to check whether or not the file is open before you can delete it.
Something like this should work for the check method.
-
Re: Please test this
Well what I did is added a On Error resume next on the For loop, which all temp folders, most of the time have files in use, it just skips all the ones in use, and deletes the one's that are not.
-
Re: Please test this
Using On Error Resume Next such as that is bad practice.
-
Re: Please test this
But it still works? as intended. So Explain?
-
Re: Please test this
-
Re: Please test this
With the GetFiles functions, the result is not an array of strings right? If I'm not mistaken My.Computer.FileSystem.DeleteFile() takes a string. If you use TMPfile.FileName it may work? Also, Nightwalker83 makes a good point with the use of On Error Resume Next. Maybe use try/catch as an alternative? At least it lets you know what type of errors you're dealing with.
~mshamory
-
Re: Please test this