forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@File() function

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Sat Aug 31, 2002 12:35 pm    Post subject: @File() function Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Aug 31, 2002 1:05 pm    Post subject: Reply with quote

What exactly are you having trouble with? I have Windows XP...
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Sat Aug 31, 2002 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Aug 31, 2002 3:11 pm    Post subject: Reply with quote

Maybe you should use @file(%%file,F)???
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Aug 31, 2002 3:15 pm    Post subject: Reply with quote

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. Confused
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sat Aug 31, 2002 4:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Aug 31, 2002 7:27 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Sun Sep 01, 2002 4:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Sep 01, 2002 5:55 pm    Post subject: Reply with quote

In addition to Mac's answer, you could also use @trim(%%file)...
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Sun Sep 01, 2002 10:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group