Restored from previous forum. Originally posted by TronDoc.
I've been through all of the dox...File...FileSystem...GetFilePart
GetPathPart...none of these address this issue....I've searched the forums.
viewtopic.php?t=18 Current Directory&Forum_Title=Tricks %27n%27 Tips
is a valiant effort at a work-around..
we really need some way to get rid of having to use FULL PATHNAMES.
a built-into-PureBASIC command that
will work on WinOS, AmigaOS and LinuxOS
that gets the current directory into a string
would help immensely...especially while troubleshooting!
I keep having to cut and paste things like:
C:\APPSWIN\PROG\PureBasic\!MORECODE\0119PBX\registry\testfile.bin
Joe Block
P.S. a KillDir() function is common in many BASICs also
P.P.S. maybe I'm just having another bad day - the doc reduced my meds..
elecTRONics DOCtor
{registeredPB}
Edited by - TronDoc on 02 February 2002 02:48:24
[Implemented] GetCurDir or something!
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> also, wouldn't it be more logical that the executable
> operate on files in its current directory by DEFAULT?
But it does... compile the following into an executable, then run it, and the
test file will be created in the same folder as the executable.
PB - Registered PureBasic Coder
> also, wouldn't it be more logical that the executable
> operate on files in its current directory by DEFAULT?
But it does... compile the following into an executable, then run it, and the
test file will be created in the same folder as the executable.
Code: Select all
r=createfile(0,"test.txt")
if r0
writestringn("worked")
closefile(0)
endif
PB - Registered PureBasic Coder
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by TronDoc.
my mistake, I was once again refering to the IncludeBinary problem I have..
..it seems to work without a path for some folks and not for others....
the first time (EVERY first time) that I try to compile the code I get
this message box:
ASSEMBLY ERROR!
PLEASE MAIL US THIS FILE.
if I attempt to compile the code after acknowledging the
error I get this message box:
ERROR REPORTED:
Line ##: Included file not found: filename.ext
Edited by - TronDoc on 02 February 2002 02:50:59
my mistake, I was once again refering to the IncludeBinary problem I have..
..it seems to work without a path for some folks and not for others....
Code: Select all
MyIncludeFile:
IncludeBinary "filename.ext"
this message box:
ASSEMBLY ERROR!
PLEASE MAIL US THIS FILE.
if I attempt to compile the code after acknowledging the
error I get this message box:
ERROR REPORTED:
Line ##: Included file not found: filename.ext
Edited by - TronDoc on 02 February 2002 02:50:59
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
problem as you. I'm looking into it now to see if there's a way to do it.
Rest assurred I'll post anything I find here!
UPDATE: Yep, it's a bug. Even using IncludePath doesn't make it work.
Fred, can you make the next version of the editor make IncludeBinary search in
the same path as the *.pb file being edited? Thanks!
PB - Registered PureBasic Coder
Edited by - PB on 01 February 2002 23:22:47
I've misunderstood your problem, and now I acknowledge that I have the sameit just doesn't make sense that
some users/don't have to do
anything special for it
to work..
problem as you. I'm looking into it now to see if there's a way to do it.
Rest assurred I'll post anything I find here!
UPDATE: Yep, it's a bug. Even using IncludePath doesn't make it work.
Fred, can you make the next version of the editor make IncludeBinary search in
the same path as the *.pb file being edited? Thanks!
PB - Registered PureBasic Coder
Edited by - PB on 01 February 2002 23:22:47
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by TronDoc.
whew! I thought I was going crazy for a little while there...thanks...jbI've misunderstood your problem, and now I acknowledge that I have the sameit just doesn't make sense that some users/don't have to do
anything special for it to work..
problem as you. I'm looking into it now to see if there's a way to do it.
Rest assurred I'll post anything I find here!
UPDATE: Yep, it's a bug. Even using IncludePath doesn't make it work.
Fred, can you make the next version of the editor make IncludeBinary search in
the same path as the *.pb file being edited? Thanks!
PB - Registered PureBasic Coder