|
| Re: HCreationIfNotFound for some common files |
| Iniciado por guest, 17,ene. 2018 15:06 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 17,enero 2018 - 15:06 |
Hello,
Would like to create only those files required for this project, if those files are not found. Is there any way to achieve this with HCreationIfNotFound command ?
Say I would like to create those files that starts with HO only, from the analysis, can I mention HCreationIfNotFound("HO*") or equivalent to this ?
That way I can have the same analysis to be used for different projects and when required all application(s) could interact with the same database.
Any solution ?
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,enero 2018 - 15:28 |
Hi
you can do a hlistFile, then loop on the result and create or not based on your tests on the name of the file
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,enero 2018 - 20:23 |
Hi From within the analysis create a Custom Folder and put those files into it. Then HCreationIfNotFound(FolderName) will do the trick.
HTH
David |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,enero 2018 - 22:11 |
Hello
From the Help Note: The automatic creation of non-existing data files can be enabled during the project description ("Files" tab of project description, "Automatically create the data files if not found at opening" option). HCreationIfNotFound is automatically used if the data file does not exist when it is handled for the first time.
If you enable the creation at the project level they will only be created if the code uses them so if your code doesn't use a file, it will not be created.
Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,enero 2018 - 04:52 |
Thanks Fabrice, David Egan, AI.
Fabrice idea worked out. Looks like David Egan's solution looks better for my needs. I'll try out.
AI. Special thanks to you. I was wondering how few files are created automatically when run. By disabling the feature you mentioned, I could figure out a unnecessary code in my code, which solved my other issue. [ for which I was about to seek your help ].
I wish Windev need not create files automatically unless otherwise I code. That feature is already there.
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | | | |
| | |
|