Topic Options
Rate This Topic
#105669 - 01/04/05 08:31 AM Does File Exist in AL
Anonymous
Unregistered


Is it possible to determine in an Active Link if a file exists on the local/client computer?

Assume for this example that the client is running Windows XP. I would like to avoid using batch files on the clients and use only workflow in an Active Link.

I have tried this Set Fields command but I receive an error message when the file does not exist.

$PROCESS$ cmd.exe /c "dir /b c:\testfile.txt"

Thanks.

Top
#105670 - 01/04/05 10:39 AM Re: Does File Exist in AL [Re: Anonymous]
Anonymous
Unregistered


Followup - I found this method that seems to work well:

$PROCESS$ cmd.exe /c "if exist c:\testfile.txt (echo Yes) else (echo No)"

The Set Fields action sets the field to either "Yes" or "No". I can then test the value of the field.

If there is a better way please reply.
Thanks.

Top