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() question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 12:36 am    Post subject: @file() question Reply with quote

hello all

what i'am trying to do is check to see if a file is in a folder

for explame

c:\test\test\whatever.1st

whatever = any file name Sad

now i know i can use @ext(1st) for the file ext BUT i can't uses @name() cause that could be anaything Sad

any ideas how to get @file to work right with just a file ext? or any other ideas how to do this? or i'am overlooking something simple?

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Feb 19, 2005 1:26 am    Post subject: Reply with quote

Could you explain a little better what exactly you are trying to do?
_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 2:35 am    Post subject: Reply with quote

what i'am trying to do is if file whatever.1st is in folder test do something if its not then go onto next part of the script... the problem i have is that whatever can be any file name Sad so is there a way to make @file() look at file ext?

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 4:20 am    Post subject: Reply with quote

to explain more is:

%f = c:\test\test\whatever.1st

if @file(%F)

INFO %f file is there

end

now how can i have @file check for a file when the filename can be diff but the ext will be the same?

i hope i explain this better

sorry about

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Sat Feb 19, 2005 4:42 am    Post subject: Reply with quote

Code:

LIST CREATE, 1
LIST FILELIST, 1, c:\test\test\*.1st

if @greater(@count(1), 0)
   INFO File found...
else
   INFO File does not exist...
end


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
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 4:49 pm    Post subject: Reply with quote

thanks that seems to work Smile

thanks again all for the help

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sun Feb 20, 2005 11:36 am    Post subject: Reply with quote

I think @file(c:\test\test\*.1st) would also work.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 22, 2005 4:04 am    Post subject: Reply with quote

i think i tried that and it didn't work.. (keyword i think)
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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