filename not found? but it's right there!!!

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by willinyork.

Hi

I have coded a front end for a dos app, and when I compile it works fine. However when you click the buttongadget which sends the instructions to the dos app it says "Error at line 179 - Filename not found"

This is the line of code causing it:

RunProgram("c:\AIFF2VAG.exe"+loop$+raw$+rate$+Chr(13)+endian$,files$, 1)

However, I DO have a program called AIFF2VAG.exe in drive C:\

I don't understand!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.
Hi

I have coded a front end for a dos app, and when I compile it works fine. However when you click the buttongadget which sends the instructions to the dos app it says "Error at line 179 - Filename not found"

This is the line of code causing it:

RunProgram("c:\AIFF2VAG.exe"+loop$+raw$+rate$+Chr(13)+endian$,files$, 1)

However, I DO have a program called AIFF2VAG.exe in drive C:\

I don't understand!
The problem is that it doesn't search for a program called "c:\AIFF2VAG.exe". You see you add this to the filename loop$+raw$+rate$+chr(13)+endian$, and whatever is in those variables is added to the filename you're trying to run. So for instance if i do like this:

Code: Select all

a$ = " a$"
b$ = " b$"
parameter$ = "iff_file.iff"
RunProgram("c:\AIFF2VAG.exe"+a$+b$, parameter$, 1)
The above program will try to run this file "c:\AIFF2VAG.exe a$ b$" with the parameter "iff_file.iff". So what you want to do is this:

Code: Select all

RunProgram("c:\AIFF2VAG.exe",loop$+raw$+rate$+Chr(13)+endian$+files$, 1)
Or something similar.






Edited by - Pupil on 22 May 2002 15:38:46
Post Reply