SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FileFindFirst, FileFindNext loop

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FileFindFirst, FileFindNext loop
Author Message
T. Smith



Joined: 18 Sep 2001
Posts: 2

Post FileFindFirst, FileFindNext loop Reply with quote

I am using the 2 functions (FileFindFirst, FileFindNext)in a loop, exactly like the sample JAL for the FileFindFirst function.
The problem I am having is that if I specify a full path (such as "C:\temp\*.*") in the first (filename) parameter, it returns me the first matching filename in the second parameter (firstfile) - so far, so good. But as soon as I try to use the firstfile variable, I get a "file not found" error.

What is strange is that if I let it use the current directory for the filename parameter (such as "*.*"), it works fine. It finds and can process each file.

Even using the EXACT example code, but substituting a full path for parameter 1, I get the error?

This is driving me nuts - Has anyone else encountered this problem?

Thanks!


Tue Sep 18, 2001 2:18 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: FileFindFirst, FileFindNext loop Reply with quote

Please use double-backslashes instead of single backslashes. For more info please see "Special ASCII characters" topic in the help

Example "c:\\temp\\*.*" or "c:\\temp\*.*"

: I am using the 2 functions (FileFindFirst, FileFindNext)in a loop, exactly
: like the sample JAL for the FileFindFirst function.
: The problem I am having is that if I specify a full path (such as
: "C:\temp\*.*") in the first (filename) parameter, it returns me
: the first matching filename in the second parameter (firstfile) - so far,
: so good. But as soon as I try to use the firstfile variable, I get a
: "file not found" error.

: What is strange is that if I let it use the current directory for the
: filename parameter (such as "*.*"), it works fine. It finds and
: can process each file.

: Even using the EXACT example code, but substituting a full path for parameter
: 1, I get the error?

: This is driving me nuts - Has anyone else encountered this problem?

: Thanks!

Tue Sep 18, 2001 2:43 pm View user's profile Send private message
T. Smith



Joined: 18 Sep 2001
Posts: 2

Post Re: FileFindFirst, FileFindNext loop Reply with quote

: Please use double-backslashes instead of single backslashes. For more info
: please see "Special ASCII characters" topic in the help

: Example "c:\\temp\\*.*" or "c:\\temp\*.*"

Sorry, I didn't proofread my message very well. I definitely DID use the double backslashes in the path. As I stated, it DOES return the first matching filename, I just can't use it for anything (such as a FileGetAttr statement)

Any other suggestions?

Tue Sep 18, 2001 2:59 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: FileFindFirst, FileFindNext loop Reply with quote

How do you use it?

May be you need to add the path before you [use] this file?
To add the path do something like
Concat "c:\\temp\\", myfile, myfile

: Sorry, I didn't proofread my message very well. I definitely DID use the
: double backslashes in the path. As I stated, it DOES return the first
: matching filename, I just can't use it for anything (such as a FileGetAttr
: statement)

: Any other suggestions?

Tue Sep 18, 2001 4:57 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.