06-27-2011 08:44 AM
I am creating a VI that when run will prompt a user to choose a file. It will then copy the file to a specified directory. I got this program to work perfectly with .dbc files, but now I need to make a version that works for .exe files. Running through the program is no problem, what happens is that when I select the applicatoin I want; instead of copying APPNAME.exe it copies over the folder the .exe is in and the rest of the contents of that folder. For example,
c:\application\app.exe
Through file prompt I select app.exe and I get copied this,
d:\directory\app.exe\app.exe
Where the first app.exe is a folder containing app.exe + everything else that was in the application folder.
If I try to copy the file over again I get this,
c:\application\app.exe --> d:\directory\app.exe\application\app.exe
Where it takes the original folder name (application) and sticks it in the app.exe folder. Again all the files in application go along with it.
I can't figure out it does this with the .exe files, but not with the .dbc files. The only thing that has changed from the two VIs is that the .exe VI will check to make sure the file extension is .exe before copying. Any help would be appreciated, thanks.
06-27-2011 08:50 AM
Can you post your code so that we can see what you are trying to do?
06-27-2011 09:17 AM
I'm still not sure why it was happening, but I found a way around it by re-arranging some things in my code. If I run into it later I'll be sure to post my code with it. I appreciate the interest in helping. Thanks.