| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Feb 19, 2005 12:36 am Post subject: @file() question |
|
|
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
now i know i can use @ext(1st) for the file ext BUT i can't uses @name() cause that could be anaything
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  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sat Feb 19, 2005 1:26 am Post subject: |
|
|
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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Feb 19, 2005 2:35 am Post subject: |
|
|
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 so is there a way to make @file() look at file ext?
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Feb 19, 2005 4:20 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Feb 19, 2005 4:42 am Post subject: |
|
|
| 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  _________________ 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Feb 19, 2005 4:49 pm Post subject: |
|
|
thanks that seems to work
thanks again all for the help _________________ Have a nice day  |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Feb 20, 2005 11:36 am Post subject: |
|
|
I think @file(c:\test\test\*.1st) would also work. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Feb 22, 2005 4:04 am Post subject: |
|
|
i think i tried that and it didn't work.. (keyword i think) _________________ Have a nice day  |
|
| Back to top |
|
 |
|