in reply to Change Working Directory in Windows!
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Change Working Directory in Windows!
by Jenda (Abbot) on Jan 22, 2010 at 10:41 UTC | |
by ikegami (Patriarch) on Jan 22, 2010 at 17:48 UTC |