     (goto-char (point-max))
     (comint-bol nil)
     (not (eq (point) (point-max)))))
+
+(defun specware-build-cd-command (dir)
+  (specware-build-command "cd %s" (if *windows-system-p* dir (shell-filename dir))))
 
 (defun specware-build-command (str &rest args)
   (let ((win (get-buffer-window *specware-build-buffer-name*)))

	    ;; executable: either generic lisp or standalone specware
	    (sw::normalize-filename 
	     (expand-file-name 
	      (or (getenv "LISP_EXECUTABLE")
		  default-sw-executable))))

      ;; A heap image is loaded into a (presumably generic) lisp.

  (setq sw:common-lisp-image-name 
	(or lisp-executable
	    (and (boundp 'sw:common-lisp-image-name) sw:common-lisp-image-name)
	    (getenv "SPECWARE_EXECUTABLE")
	    (getenv "LISP_EXECUTABLE")))

  (setq sw:common-lisp-image-file
