Creating a directory and copying scripts into the directory

To help you complete this activity, you must create a directory and copy several scripts into the new directory. You will use these scripts to quickly add tables and data to a new Derby database.

Tip: A command prompt appears after each command is run. If an error occurs, verify the syntax and retype the command.
  1. Open a command window and change to a directory where you want to store the files that you create during the self-study tutorial activities.
  2. Create the DERBYTUTOR directory, as shown in the following table. DERBYTUTOR will be your working directory for this activity.
    Table 1. Command to create the DERBYTUTOR directory
    Operating System Command
    UNIX (Korn Shell)
    mkdir DERBYTUTOR
    Windows
    md DERBYTUTOR
  3. Change to the DERBYTUTOR directory, as shown in the following table.
    Table 1. Command to change to the DERBYTUTOR directory
    Operating System Command
    UNIX (Korn Shell)
    cd DERBYTUTOR
    Windows
    cd DERBYTUTOR
  4. Copy the SQL scripts from the Derby  demo\programs\toursdb subdirectory into the DERBYTUTOR directory, as shown in the following table. You will use these scripts to create tables and add data to a new database, toursdb.
    Table 1. Command to copy the SQL scripts
    Operating System Command
    UNIX (Korn Shell)
    cp $DERBY_HOME/demo/programs/toursdb/*.sql .
    Windows
    copy %DERBY_HOME%\demo\programs\toursdb\*.sql .
    Important: Include the dot (.) at the end of the command so that the files are copied to the correct location.
  5. Verify that the files were copied to the DERBYTUTOR directory, as shown in the following table.
    Table 4. Command to verify that the files were copied
    Operating System Command
    UNIX (Korn Shell)
    ls
    Windows
    dir