Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
cranium144
Creator
Creator

How to check if a file exists?

I'm doing a pre-load of Fox Pro data into SQL.  This takes between 10-15 minutes.  I do not want the QV file to execute the script during that time.  So I'm thinking about checking at the beginning of the script to see if a file has been created (as a flag that says, "I'm done") .  And then how do I delete the file via the script?

Any pointers in the right direction would be much appreciated!

1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

I don't think there's a way in QlikView scripting. The only way I can think of would be by creating a macro and calling that from your script.

View solution in original post

3 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

To check if a file exists:

If not isnull(filetime('full file name')) then

cranium144
Creator
Creator
Author

Thanks!  Checking for the file worked wonderfully. 

Is there a way to delete a file?

marcus_malinow
Partner - Specialist III
Partner - Specialist III

I don't think there's a way in QlikView scripting. The only way I can think of would be by creating a macro and calling that from your script.