I wrote this as a simple program and it works fine - although it prefere IFPORT - now as a routine in WLF I get an access code violaton on run Life is a long beach and the life guard is always at the other end ! **************************************************************** ! subroutine chdirA(i) ! ! **************************************************************** use IFPOSIX implicit none CHARACTER(len=255) :: path integer i,ilen, ierror CALL PXFGETCWD (path,ilen,ierror) WRITE(*,*) TRIM(path) call PXFCHDIR("C:\",3,i) call PXFCHDIR("users\macne\documents\Visual Studio 2013\Projects\Program070 - Beams\Lothurr",76,i) write(*,*)i CALL PXFGETCWD (path,ilen,ierror) WRITE(*,*) TRIM(path) return end subroutine