# Convert-file

**Help command:** help convert-file

**General convert format:** *convert-file -I \<input file> -O \<output file>*

<table data-header-hidden><thead><tr><th width="219.33333333333331"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Command Options</strong></td><td><strong>Purpose</strong></td><td><strong>Description</strong></td></tr><tr><td>-I &#x3C;input file>         </td><td><p>Specify input file path.</p><p> </p></td><td><p>Supported formats are XML (for configuration) and RXD (for data file conversion)</p><p> </p></td></tr><tr><td>-O &#x3C;output file>        </td><td><p>Specify output target file path.</p><p> </p></td><td><p>If the input file is configuration (.xml), the output file format should be .rxc. If the input file is a data file (.rxd), supported output formats are:</p><p>·        ASAM MDF4 file (*.mf4)</p><p>·        ASCII Logging File (*.asc)</p><p>·        Vector binary frames (*.blf)</p><p>·        Peak Can Trace File (*.trc)</p><p>·        Matlab 5.0 (*.mat)</p><p>Comma Separated Values (*.csv)</p></td></tr><tr><td><p>-F &#x3C;format>      </p><p>(Optional)     </p></td><td>Specify the desired internal file format.</td><td><p>Applicable for CSV file type. Supported formats are:</p><p><strong>DiaLOG</strong> - file format structured for DiaLOG import (default).</p><p><strong>InfluxDB</strong> - file format structured for InfluxDB import.</p><p><strong>Regional</strong> - unofficial csv file format. This one uses local regional settings for the list separator and decimal separator.</p></td></tr><tr><td><p>-S &#x3C;bus> &#x3C;signal file>  </p><p>(Optional)</p></td><td>Attach signals to specific can bus.</td><td><p>It can be used multiple times for each bus.</p><p>·        Parameter &#x3C;bus> should be the name of the bus - can0, can1.</p><p>·        Parameter &#x3C;signal file> should be the signal file path. Supported file formats are DBC only.</p><p> </p></td></tr><tr><td>-R &#x3C;rate> &#x3C;method></td><td>Specify the resampling rate and method</td><td><p>Define the resampling rate in milliseconds and the method to use to obtain values:</p><p>·        <strong>near</strong> - to use the nearest sample by timestamp</p><p>·        <strong>last</strong> - last sample, which means the previous</p></td></tr><tr><td>-T &#x3C;axis> &#x3C;begin> &#x3C;end></td><td>Specify the beginning and end parameters</td><td><p>Define time axis sync initial sample timestamp source</p><p>·        <strong>first</strong> - first sample in file</p><p>·        <strong>zero</strong> - zero seconds (0 sec)</p><p> </p><p>Begin and End parameters can describe what to do before the initial sample in each channel and after the last sample in each channel. Optional values can be:</p><p>·        nothing</p><p>·        duplicate</p></td></tr></tbody></table>

### Example:

*To convert an RXD file to asc, use the below script:*

#### @echo off

CD C:\Program Files (x86)\Influx Technology\ReXdesk\\&\&rexdesk convert-file -I “C:\Users\user\Desktop\Input\New Project\_ReXgen0000049\_20210702\_113743.rxd” -O “C:\Users\user\Desktop\Output\Converted.asc”

&#x20;*To convert an RXD file to CSV after linking a DBC file, use the below script:*

#### @echo off

CD C:\Program Files (x86)\Influx Technology\ReXdesk\\&\&rexdesk convert-file -I “C:\Users\user\Desktop\Input\IMU\_out\_0000007\_20211116\_185402.rxd” -O “C:\Users\user\Desktop\Ouput\Converted.csv” -s can0 “C:\Users\user\Desktop\ReXgen\_IMU\_Out\_V2.dbc”

&#x20;*To convert an XML configuration file to rxc, use the script below:*

#### @echo off

CD C:\Program Files (x86)\Influx Technology\ReXdesk\\&\&rexdesk convert-file -I “C:\Users\user\Desktop\Input\New Project\_ReXgen0000049\_20210702\_113743.xml” -O “C:\Users\user\Desktop\Output\Config.rxc”

&#x20;*To convert an RXD file to CSV after linking the DBC file and resampling, use the below script:*

#### @echo off

CD C:\Program Files (x86)\Influx Technology\ReXdesk\\&\&rexdesk convert-file -I

“C:\Users\user\Desktop\Input\IMU\_out\_0000007\_20211116\_185402.rxd” -O

“C:\Users\user\Desktop\Ouput\Converted.csv” -s can0

“C:\Users\user\Desktop\ReXgen\_IMU\_Out\_V2.dbc” -r 1000 near -t first duplicate duplicate
