473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Copy from Solaris System to NT System

1 New Member
Hello

I have a task to write a script that will take a file from solaris system to NT system.

I tried first step to scan the input directory to see whether i can see the NT directory from solaris system. The script is run from solaris system. And I am getting message directory does not exists. Any idea how to solve this problem.

use::strict;
$base_dir="/home/user";
$source_dir="\/\/sstaidevcv001"; # NT System name
$destination_di r="$base_dir/dirtesting";
$file_name = "F*.pos";

scanDir($source _dir);

scanDir ($base_dir);

#moveFile($sour ce_dir, $destination_di r, $file_name);

#createFile($in fo_dir, $okfile);

sub scanDir
{
$src_dir = $_[0];
opendir(DIR, $src_dir) || die "Error: Could not Open Input Directory $src_dir";
opendir(DIR,$sr c_dir);
$name = "(?i)". $file_name;
print "\n $name \n";
my @files = grep (/$file_name/, readdir(DIR));
closedir(DIR);

foreach (@files)
{
$file = $_;
print $file
}

}
Jul 18 '06 #1
1 2238
Banfa
9,065 Recognized Expert Moderator Expert
$source_dir="\/\/sstaidevcv001"; # NT System name

You need something in here to tell the underlying OS that this is a computer name rather than a directory name. If this was Windows then you would be able to do something like

\\\/\/sstaidevcv001

However it's not and I don't know how you would do the same thing in *nix which doesn't necessarily share the File and Printer Sharing services that Windows uses.
Jul 19 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
16646
by: o'seally | last post by:
solaris/linux admins/rookie_developers that battle with this error are probably all frustrated when it happens. i bet you're also somehow frustrated by this seemingly unsolvable error :-) ...take it easy, it'll go away once u've learned how to play around with a few things on your system and reorganised. i'm particulary a solaris junkie, but linux is my admiration. the issue here is Not the OS/Software, but rather the concept. first of all...
1
4323
by: Tony George | last post by:
Hi, I'm having a problem using the Copy module on a ClearCase view that's been set as "readonly" (i.e. ct chview -readonly <view tag>). I want to copy a file out of this view and put it in another directory that's outside of ClearCase. The strange thing is that the copy command actually copies correctly. The problem is that it returns a "0" errorcode because of the fact that the view is readonly. I guess "copy" still tries to write...
3
1923
by: gmtonyhoyt | last post by:
Okay, this one's a tough one for me to explain so this might take a few e-mails to get the idea across. Here's what I got though. I have this application running on a Sun/Solaris machine, written in C, using the Sun Forte Developer 7 C 5.4 Compiler released a few years ago. Not exactly old but, you get the picture. Now, most if not all the file handles on this machine are most likely being used up by a secondary process and/or...
32
5861
by: Olivier | last post by:
Dear all, I thought the code ----------------------------- pt_fichier_probleme = fopen(nom_fichier, "w"); if(pt_fichier_probleme == NULL){ message_warning_s ("Erreur l'ouverture du fichier\n%s\n", (gchar *)nom_fichier); return;}
6
3068
by: dylan.boudreau | last post by:
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d PHP/5.0.4 on Solaris 10. phpinfo() lists the location of php.ini as /usr/local/apache/conf and my php.ini file is there but for some reason it does not appear to be being read by php. I have defined things such as upload_tmp_dir in that file yet even with restarting apache I am not seeing this reflected in phpinfo(). I am pretty new to PHP so its entirely possible...
3
2390
by: susinthaa | last post by:
Hi , Is there any command in perl to copy a log file from solaris machine to windows machine after telnet to that machine? After copying how can we check that log for particular event? Thanks and Regards, Susi
9
3383
by: susinthaa | last post by:
Hi, How to copy a file from solaris to windows? Thanks, susi
11
3820
by: itdevries | last post by:
Hi, I'm trying to convert some char data I read from a binary file (using ifstream) to a float type. I've managed to convert the int types but now I need to do the float types as well but it doesn't seem to work. The code below is what I'm trying to use. Anyone see any obvious errors? or have any hints/pointers? regards, Igor float floatRead = 0;
0
1808
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi/src
0
9555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8247
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.