View previous topic :: View next topic |
Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sat Aug 31, 2002 12:35 pm Post subject: @File() function |
|
|
I have found that sometimes the @file() function does not
work on NT based systems. I have had problems with it in
Win 2K and XP. Has anyone else had this problem? I need to
find out ASAP because a lot is depending on this. I need to
find a work around for the @file() function as well.
Thanks, _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Aug 31, 2002 1:05 pm Post subject: |
|
|
What exactly are you having trouble with? I have Windows XP... _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sat Aug 31, 2002 3:06 pm Post subject: |
|
|
When using the @file() function it doesn't see the file.
Example:
Code: |
%%file = C:\autoexec.bat
if @file(%%file)
Info File found!
else
Info File not found!
end
|
Even thought that C:\autoexec.bat is there it would not see the file.
It does not happen all of the time but it has happened. I have no
clue why it happens. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Aug 31, 2002 3:11 pm Post subject: |
|
|
Maybe you should use @file(%%file,F)??? |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Aug 31, 2002 3:15 pm Post subject: |
|
|
I tried that code, even repeatedly running it, and it said that the file was found every time...I don't really know what would be wrong...perhaps you should look over your code to see that you are not changing the %%file variable accidentally...I have used this in my programs and have never had a problem. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Aug 31, 2002 4:55 pm Post subject: |
|
|
This will happen if the file is hidden or maybe has other attributes set, maybe try
something like this:
@file(c:\io.sys,AHSR) |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Aug 31, 2002 7:27 pm Post subject: |
|
|
Ya might also make sure you have no trailing spaces
on the line when assigning the filename to a var,
and it doesn't hurt to use quotes...
%%file = "c:\autoexec.bat"
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sun Sep 01, 2002 4:24 pm Post subject: |
|
|
I'll have to give thoes a try. I thought I tried all
of that, but, I'll give them a try again.
thanks _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Sep 01, 2002 5:55 pm Post subject: |
|
|
In addition to Mac's answer, you could also use @trim(%%file)... |
|
Back to top |
|
|
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Sun Sep 01, 2002 10:39 pm Post subject: |
|
|
I had that problem on NT too a while back, but putting the name in quotes like Mac said fixed this problem. Also, just to be safe, I often use the @SHORTNAME() function if the folder names are long or have spaces -- maybe just being over cautious, but I have had no trouble since. |
|
Back to top |
|
|
|