ksh script to get files from Windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh script to get files from Windows
# 1  
Old 11-05-2012
ksh script to get files from Windows

I have googled and searched and can't come up with anything that works for me, so I'll ask the experts on here...

I have a ksh script on UNIX, and a file on a Windows network drive. I need the script to get the file from the Windows network drive and save it in a folder on UNIX.

-This MUST be done from the UNIX side.
-I can NOT install anything on UNIX like samba
-I can NOT change settings on the Windows network drive.

Please help...
# 2  
Old 11-05-2012
Have you tried mounting the Windows share so you can access the file?

Code:
mkdir /mnt/winbloze

mount -t cifs -o rw,username=<username> //WindowsServer or IP/share /mnt/winbloze

or 

mount -t smbfs -o rw,username=<username> //WindowsServer or IP/share /mnt/winbloze

# 3  
Old 11-05-2012
I get:
Code:
 
nfs mount: insufficient privileges

I also don't have the -t option in my version of mount.

Unfortunately, I don't administer either of these servers and as a single gear in the machinery of a major corporation, I am not likely to get changes to security or access permissions.
Smilie

Any more ideas?
# 4  
Old 11-05-2012
What version of Unix?
# 5  
Old 11-05-2012
Code:
~>uname -a
SunOS crdap400 5.10 Generic_147440-09 sun4u sparc SUNW,Sun-Fire-15000

and I don't have Samba, and probably wouldn't be allowed to install it...this is one of those "assigned by someone who had to look up UNIX in a dictionary, but is sure it can do whatever they want" kind of projects
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX ksh Copy Files Script

I need a UNIX ksh script that counts the number of files in directory, if the files exceed 20 files, then email results. I want the script to run every hour.. I don't have access to cron.. I'm some what new to UNIX. Windows guy all my career.. this is what I have so far.. #!/bin/ksh # count.sh ... (5 Replies)
Discussion started by: PerlHaven2k
5 Replies

2. UNIX for Dummies Questions & Answers

Help with ksh script to list files, cp it to another UNIX server

Hi, I'm quite new to ksh scripting, can someone help me with this. Requirements: I need to create a script that list the files from a user input date range. e. g. format of file: *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00*... (7 Replies)
Discussion started by: chococrunch6
7 Replies

3. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

4. Windows & DOS: Issues & Discussions

Windows remote to Solaris to execute ksh script

Hi all, I'm not sure if it is correct to post here. I am facing problem wanting to create a batch that run from my Windows XP pc to remote to multiple Solaris server to execute the server's ksh script. :wall: Can anyone give me a hints on how to do that? Thanks. (6 Replies)
Discussion started by: beginningDBA
6 Replies

5. Shell Programming and Scripting

How to unzip files from folder in shell script (ksh)?

I have a folder (C:\shellprg\input\) containing .CSV, .zip, .gz files. 1] I want to find all .zip/.gz files from folder (C:\shellprg\input\). 2] unzip/uncompress files into the same folder (C:\shellprg\input\) through shell script. I am using below commands for unzip files, unzip <filename>... (2 Replies)
Discussion started by: Poonamol
2 Replies

6. Shell Programming and Scripting

KSH Script to watch log files for 2 strings

Hi all, How can I do a ksh script to watch a log file for 2 specific alarms that have one this string : "Connection Error" and the other one: "Failure in sending". I would like to watch for these two alarms in the log and then if each of them repeats for about 30 times to go kill 2 processes. ... (1 Reply)
Discussion started by: Pouchie1
1 Replies

7. Shell Programming and Scripting

Comparing same size of files using KSH script

Hi, I have a requirement I have to find out the same size of files with different name in a particular directory. For ex: I have around 1 lack records in a directory and in that I have abcd.jpg, abcd_1.jpg with same size each. I need to seperate these two records from that file.... (3 Replies)
Discussion started by: siri_886
3 Replies

8. Shell Programming and Scripting

Run KSH script in Windows machine

Hi i created a unix script ksh that goes to a specific folder/xyz/abc, searches for all the .txt files in it and perform some operation on these text file. It runs well in Unix server(machine) Now this script needs to be run on a windows machine having the same folder structure(that is look... (1 Reply)
Discussion started by: mad_man12
1 Replies

9. Shell Programming and Scripting

how to convert unix .ksh script to windows .batch script

I am using awk in my .ksh script but when I am trying to run in windows its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like. thanx. #!/bin/ksh egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies

10. Shell Programming and Scripting

ksh script to analyze log files on AIX 5.2

Hi, I have written a script that traps errors on different servers from the log files based on the current system date. The trapped errors are written to a file and file is sent as an attachment to an email. I would like to run this script for every 2hrs. when i run the script from the second... (0 Replies)
Discussion started by: itzcoolbuddy
0 Replies
Login or Register to Ask a Question