Use chdir.
chdir($dir) or die("Can't change to dir $dir: $!\n");
The argument can be
If both a drive and a directory is provided, both the current drive and the current directory on that drive will be changed. This differs from the cd shell command which only does the latter.
Both slashes (\ and /) can be used as a separator and to prefix a UNC path.
Make sure to properly escape backslashes in the string literals that produce the paths if applicable.
In reply to Re: Change Working Directory in Windows!
by ikegami
in thread Change Working Directory in Windows!
by ccdoub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |