# General > Application Testing >  Please test this

## Rayz1177

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)

----------


## Nightwalker83

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.

----------


## Rayz1177

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.

----------


## Nightwalker83

I have .NET framework 4.0 installed.

Edit:

Nothing appears to be deleted from the Appdata/local/temp either.

----------


## Rayz1177

Well I don't understand why it is not working for you, it works perfectly for me Windows 7 x64 bit. 

Whats ure OS?

----------


## Nightwalker83

Windows 7 x64 bit.

----------


## Rayz1177

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?

----------


## Nightwalker83

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.

----------


## Rayz1177

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.

----------


## Nightwalker83

Using On Error Resume Next such as that is bad practice.

----------


## Rayz1177

But it still works? as intended. So Explain?

----------


## Nightwalker83

Read this.

----------


## mshamory

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

----------


## jiju

:wave:  nice......

----------

