How to use imexutil.bat on Windows with either "-dir" and "-outdir" keywords when following directory name contains white space(s).

Document ID : KB000044385
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 

What syntax should be used to run the imexutil.bat on Windows with either "-dir" and "-outdir" keywords when following directory name contains white space(s)?

Background:  

The imexutil.bat running with the parameters as a single clause does not read targeted directory if its name contains white space(s); for example

D:\CAWA_12\bin>imexutil.bat -h dehost -p 7500 -u JROE -w passwrd -c "exportcalendar -outdir d:\Export 12\Arti Facts"

exports the calendar artifacts into the 'Export' directory which yet has been created upon the utility running. The same incident happens when the 'import<artifacts>' with the '-dir' is in place.

Environment:  

MS Windows

Instructions: 

 

As it is known, such an issue could be solved by using double quotes around the directory name; however with the imexutil.bat utility you also have to use the backslash \ before the double quote " in order to make java to read it literally:

D:\CAWA_12\bin>imexutil.bat -h dehost -p 7500 -u JROE -w passwrd -c "exportcalendar -outdir \"d:\Export 12\Arti Facts\""