Difference between revisions of "DOS Directory File List"

From Tuflow
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
<li> Change directory to the folder location where you would like to write a list of the files contained within it (example syntax: '''<tt>cd D:\Example\TUFLOW\model\grid</tt>''' then press Enter)<br>
 
<li> Change directory to the folder location where you would like to write a list of the files contained within it (example syntax: '''<tt>cd D:\Example\TUFLOW\model\grid</tt>''' then press Enter)<br>
 
<li> Write a text file listing the folder contents using the following syntax: '''<tt>dir > filename.txt</tt>'''<br>
 
<li> Write a text file listing the folder contents using the following syntax: '''<tt>dir > filename.txt</tt>'''<br>
 +
You can add a file extension to the syntax if you would like to restrict the list to files of a particular type. For example '''<tt>dir *.asc > filename.txt</tt>'''<br>
 
</ol>
 
</ol>
A text file called '''<tt>filename.txt</tt>''' will be written to the folder containing the files. The file names are listed in the right-hand column.<br>
+
A text file called '''<tt>filename.txt</tt>''' will be written to the folder you are working in. The file names are listed in the right-hand column.<br>
 
[[File:DOS_File_List_007.PNG|500px]]<br>
 
[[File:DOS_File_List_007.PNG|500px]]<br>
 
=Example Application - Stitching ALS Data Tiles Together =
 
=Example Application - Stitching ALS Data Tiles Together =
the above mentioned folder contents file may be useful during TUFLOW modelling if ALS topography data has been provided in tile format for a catchment. In some situations over 500 *.asc files may make up a complete study area. Rather than stitching the data into a single topography dataset using GIS software, data layering within the TGC can be used to read each source *.asc ALS tile into the TUFLOW flood model. The column edit mode in <u>[[NotepadPlusPlus_Tips | Notepad++]]</u> and <u>[[UltraEdit_Tips | UltraEdit]]</u> make this update a simple exercise that takes minutes (rather than the onerous alternative of typing the command reference lines one after another into the TGC manually).<br>
+
The above mentioned folder contents file may be useful during TUFLOW modelling if ALS topography data has been provided in tile format for a catchment. In some situations over 500 *.asc files may make up a complete study area. Rather than stitching the data into a single topography dataset using GIS software, data layering within the TGC can be used to read each source *.asc ALS tile into the TUFLOW flood model. The column edit mode in <u>[[NotepadPlusPlus_Tips | Notepad++]]</u> and <u>[[UltraEdit_Tips | UltraEdit]]</u> make this update a simple exercise that takes minutes (rather than the onerous alternative of manually typing each command reference line one after another into the TGC).<br>
  
 
<ol>
 
<ol>
Line 16: Line 17:
 
<li> Turn on column edit mode. <br>
 
<li> Turn on column edit mode. <br>
 
* In Notepad++ hold in '''<tt>Alt</tt>''' prior to and during a selection <br>
 
* In Notepad++ hold in '''<tt>Alt</tt>''' prior to and during a selection <br>
* In UltraEdit hold in '''<tt>Alt+C</tt>''' prior to and during a selection <br>
+
* In UltraEdit hold in '''<tt>Alt+C</tt>''' prior to making a selection <br>
 
<li> Select and copy the .asc or .flt file names.<br>
 
<li> Select and copy the .asc or .flt file names.<br>
 
[[File:DOS File List 004.PNG|500px]]<br>
 
[[File:DOS File List 004.PNG|500px]]<br>
Line 22: Line 23:
 
<font color="blue"><tt>Set Zpts </tt></font> <font color="red"><tt>== </tt></font> <tt><value></tt><br>
 
<font color="blue"><tt>Set Zpts </tt></font> <font color="red"><tt>== </tt></font> <tt><value></tt><br>
 
We recommend using this value to check for any missing data or gaps between the ALS tiles after running the TUFLOW model for the first time.<br>
 
We recommend using this value to check for any missing data or gaps between the ALS tiles after running the TUFLOW model for the first time.<br>
<li> Paste the .asc file name list into the TGC file.<br>
+
<li> Paste the .asc file name list into the TGC file below the <font color="blue"><tt>Set Zpts </tt></font> command.<br>
 
[[File:DOS File List 005.PNG|500px]]<br>
 
[[File:DOS File List 005.PNG|500px]]<br>
 
<li> Add the necessary command syntax and file path details left of the .asc file names using your preferred text editor (<u>[[NotepadPlusPlus_Tips | Notepad++]]</u> or <u>[[UltraEdit_Tips | UltraEdit]]</u>) using column edit mode. <br>
 
<li> Add the necessary command syntax and file path details left of the .asc file names using your preferred text editor (<u>[[NotepadPlusPlus_Tips | Notepad++]]</u> or <u>[[UltraEdit_Tips | UltraEdit]]</u>) using column edit mode. <br>
 
[[File:DOS File List 006.PNG|500px]]<br>
 
[[File:DOS File List 006.PNG|500px]]<br>
 
<li> After running the TUFLOW model for the first time, use the <u>[[TUFLOW_Check_Files | _DEM_Z.flt]]</u> and / or <u>[[TUFLOW_Check_Files | _zpt_check]]</u> simulation check files to confirm there are no topography data gaps. Do this by completing a search query for the global model elevation value that was used (in this example = <tt>2000</tt>). If the global model elevation value is present within the check files, this represents a gap in your ALS topography dataset that requires correction or additional data.<br>
 
<li> After running the TUFLOW model for the first time, use the <u>[[TUFLOW_Check_Files | _DEM_Z.flt]]</u> and / or <u>[[TUFLOW_Check_Files | _zpt_check]]</u> simulation check files to confirm there are no topography data gaps. Do this by completing a search query for the global model elevation value that was used (in this example = <tt>2000</tt>). If the global model elevation value is present within the check files, this represents a gap in your ALS topography dataset that requires correction or additional data.<br>

Latest revision as of 09:50, 19 February 2018

User Steps

These steps can be followed to output a printout of all files contained within a folder:

  1. Open the DOS command prompt
  2. If necessary, change the drive location (for example, to change from the C drive to the D drive use the syntax: D: then press Enter)
  3. Change directory to the folder location where you would like to write a list of the files contained within it (example syntax: cd D:\Example\TUFLOW\model\grid then press Enter)
  4. Write a text file listing the folder contents using the following syntax: dir > filename.txt
    You can add a file extension to the syntax if you would like to restrict the list to files of a particular type. For example dir *.asc > filename.txt

A text file called filename.txt will be written to the folder you are working in. The file names are listed in the right-hand column.
DOS File List 007.PNG

Example Application - Stitching ALS Data Tiles Together

The above mentioned folder contents file may be useful during TUFLOW modelling if ALS topography data has been provided in tile format for a catchment. In some situations over 500 *.asc files may make up a complete study area. Rather than stitching the data into a single topography dataset using GIS software, data layering within the TGC can be used to read each source *.asc ALS tile into the TUFLOW flood model. The column edit mode in Notepad++ and UltraEdit make this update a simple exercise that takes minutes (rather than the onerous alternative of manually typing each command reference line one after another into the TGC).

  1. Open filename.txt in Notepad++ or UltraEdit.
  2. Turn on column edit mode.
    • In Notepad++ hold in Alt prior to and during a selection
    • In UltraEdit hold in Alt+C prior to making a selection
  3. Select and copy the .asc or .flt file names.
    DOS File List 004.PNG
  4. Open the TUFLOW Geometry Control (TGC) file. Set the global model elevation to a value that is above all expected elevations with the topography dataset. The command is:
    Set Zpts == <value>
    We recommend using this value to check for any missing data or gaps between the ALS tiles after running the TUFLOW model for the first time.
  5. Paste the .asc file name list into the TGC file below the Set Zpts command.
    DOS File List 005.PNG
  6. Add the necessary command syntax and file path details left of the .asc file names using your preferred text editor ( Notepad++ or UltraEdit) using column edit mode.
    DOS File List 006.PNG
  7. After running the TUFLOW model for the first time, use the _DEM_Z.flt and / or _zpt_check simulation check files to confirm there are no topography data gaps. Do this by completing a search query for the global model elevation value that was used (in this example = 2000). If the global model elevation value is present within the check files, this represents a gap in your ALS topography dataset that requires correction or additional data.