12-10-2008
How to change a directory on windows via perl script
How to change a directory on windows via perl script.
I wanna mount a share on windows via perl script.
I have used:-
system("dir");
gives the list of directories in the drive i am.This command works well.
Now i want to move from c drive to z drive via perl script.I am using:-
system("chdir /D z:");
also tried---
system("z:");
`z:`
but no success...
can some one help me please?????
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am using perl in win2000advanced server...
---------------------------
perl -version:
---------------------------
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 638 provided by... (1 Reply)
Discussion started by: sekar sundaram
1 Replies
2. Shell Programming and Scripting
I would like to have a script that would change my current working directory. However, any time I execute a 'cd' command in a script, it holds only for the life of that script -- the working directory on exit is the same as when the script was initiated. Is it possible to have the script return... (3 Replies)
Discussion started by: George Borrmann
3 Replies
3. Shell Programming and Scripting
:confused:
Hi All,
This script is not working. I want to change the directory as per users selection in current shell. Looks like it is spawning sub-shell internally.
I have used
. changedir.sh
source changedir.sh
./changedire.sh
But did not work. Currently shell directory remain the... (4 Replies)
Discussion started by: shiningram
4 Replies
4. Linux
How do u change ur directory using a shell script?? (12 Replies)
Discussion started by: laxmi
12 Replies
5. Shell Programming and Scripting
Hi,
When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script...
Script:
REM :: File Name : Refresh_OTL.bat
REM :: Parameters : %1 - Region
REM :: : %2 - Cube Type
REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies
6. Shell Programming and Scripting
Hi,
I am trying to change the directory in my script, & want to check if the directory is present or not .
Ex:
cd /home/xyz/temp/logs
if the logs directory is not present i want to show the error in script instead of shell script error.
Can anybody please help me on the same
Thx in... (2 Replies)
Discussion started by: vls1210
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Need help configuring Active Perl on Windows Vista.
I am trying to install Active Perl on Windows Vista.
The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006
After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Discussion started by: Vabiosis
2 Replies
8. Shell Programming and Scripting
HI,
I need to change the working directory by using the shell script
/Export/home/user_name
I have to go one step back like
/Export/home
Please help on this.:confused: (3 Replies)
Discussion started by: thelakbe
3 Replies
9. Shell Programming and Scripting
Hi
Can any one please support:
From Windows, I am running perl script located in C:/scripts directory and need to run a command "ls | sort | uniq" on the files in D:/temp directory.
#!c:\perl\bin\perl.exe
$file_dir="D:\\temp";
$command1="cd";
$command2="ls | sort | uniq";... (2 Replies)
Discussion started by: sureshcisco
2 Replies
10. Shell Programming and Scripting
Hi Gurus, kindly analyse the following for me, please
OS: Windows 7
Code location: C:\
Output: "Program Files not being recognised"
"System Volume Information is a directory"
"Windows not being recognised"
main {
my @dirlist = <*>;
foreach my $fn... (0 Replies)
Discussion started by: biglau
0 Replies
LEARN ABOUT MOJAVE
mount_pcfs
mount_pcfs(1M) System Administration Commands mount_pcfs(1M)
NAME
mount_pcfs - mount pcfs file systems
SYNOPSIS
mount -F pcfs [generic_options] [-o FSType-specific_options] special | mount_point
mount -F pcfs [generic_options] [-o FSType-specific_options] special mount_point
DESCRIPTION
mount attaches an MS-DOS file system (pcfs) to the file system hierarchy at the mount_point, which is the pathname of a directory. If
mount_point has any contents prior to the mount operation, these are hidden until the file system is unmounted.
If mount is invoked with special or mount_point as the only arguments, mount will search /etc/vfstab to fill in the missing arguments,
including the FSType-specific_options; see mount(1M) for more details.
The special argument can be one of two special device file types:
o A floppy disk, such as /dev/diskette0 or /dev/diskette1.
o A DOS logical drive on a hard disk expressed as device-name:logical-drive , where device-name specifies the special block device-file
for the whole disk and logical-drive is either a drive letter (c through z) or a drive number (1 through 24). Examples are
/dev/dsk/c0t0d0p0:c and /dev/dsk/c0t0d0p0:1.
The special device file type must have a formatted MS-DOS file system with either a 12-bit, 16-bit, or 32-bit File Allocation Table.
OPTIONS
generic_options
See mount(1M) for the list of supported options.
-o
Specify pcfs file system specific options. The following options are supported:
foldcase|nofoldcase
Force uppercase characters in filenames to lowercase when reading them from the filesystem. This is for compatibility with the pre-
vious behavior of pcfs. The default is nofoldcase.
FILES
/etc/mnttab table of mounted file systems
/etc/vfstab list of default parameters for each file system
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO
mount(1M), mountall(1M), mount(2), mnttab(4), vfstab(4), attributes(5), pcfs(7FS)
NOTES
If the directory on which a file system is to be mounted is a symbolic link, the file system is mounted on the directory to which the sym-
bolic link refers, rather than on top of the symbolic link itself.
SunOS 5.10 24 Nov 2003 mount_pcfs(1M)