Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Accessing Shared network drive folder

by Anonymous Monk
on Oct 19, 2011 at 10:02 UTC ( #932341=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Accessing Shared network drive folder
in thread Accessing Shared network drive folder

It looks like you could also use Win32::FileOp#Connect/Disconnect without mapping to a drive


Comment on Re^3: Accessing Shared network drive folder
Re^4: Accessing Shared network drive folder
by Anonymous Monk on Oct 19, 2011 at 11:35 UTC
    Brother I have tried evrything but nothing seems to be working... pls check the code below...
    use Date::Format; use Win32::Capture; $counter = 0 ; while ($counter < 5) { $datetime1 = time2str("-%d-%m-%Y-%k-%M-%S",time); $uname = Win32::LoginName() ; $cname = Win32::NodeName() ; $uname .= $cname; $uname .= $datetime1 ; $image = CaptureScreen(); # Capture Whole screen. $image->SaveToFile("$uname.png"); #$image->SaveToFile("//192.168.0.24/library/vishal/$uname.png"); my $random_number = int(rand(15)); print "\n" , $random_number ; sleep ($random_number ) ; $counter++ ; }
    In the code above the script takes a screen shot at random time. Now I have to upload this image on the linux server's share folder with username and password. I tried Map and Connect both but nothing is working.. The server shared folder path is 192.168.0.24\snapshot.. So pls help me what to do with this ?? thanks..

      What does "linux server's share" mean?

        I meant the folder in which I have to upload the image is shared via LAB on a linux machine. My PC runs WinXP. This folder is located at 192.168.0.24\snapshot. This folder is password protected. So How can I connect to this folder providing Username and password, upload the image ther and close the connection. Then repeat the same process at random time interval.. my gmail id is vishalbhatt21@gmail.com.. Can we chat over ther if u still have any doubts abt my requirements ??? I truly appreciate ur help..

      I tried Map and Connect both but nothing is working.

      Your code shows neither Map nor Connect

        Yes that was my question only bcoz I was not able to get the syntax correct for Map or connect. I tried the following Map => '\\\\192.168.0.2\snapshot',{persistent=>1,user=>'uid',passwd=>'pwd',overwrite=>1}; Above syntax gave many error: ------------------ Useless use of a constant in void context at map.pl line 11. Useless use of a constant in void context at map.pl line 11. Useless use of anonymous hash ({}) in void context at map.pl line 11. --------------------------------------------- And for Connect ther was no syntax given to include uid and password... Pls tell me how to include Map in my code posted in my previous comment..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-07-28 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (190 votes), past polls