how to call a file??

Scorps65
06-09-2005, 10:06 PM
HOW do i call a file within the same directory as the program? I know you use the CALL SHELL, but what if the user changes the directory name?

lets say i use,

CALL SHELL ("C:\Documents and Settings\Steven\My Documents\My Music\hi.mp3)

now lets say the user changes the my music name to whatever, how would the program call hi.mp3 even if the directory name is changed??

TeraBlight
06-09-2005, 10:11 PM
HOW do i call a file within the same directory as the program?

Shell defaults to App.Path unless you navigate somewhere else.
Since App.Path usually is the location of the program, and since you say the file is in the same directory as the program, simply putting

Shell "hi.mp3"

should do what you are after...

Scorps65
06-09-2005, 10:13 PM
so i would do app.path shell hi.mp3 ?

Scorps65
06-09-2005, 10:18 PM
OHH...ok got it...i only use SHELL and the name of the file!!!

WOW THANX

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum