Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Batch file help?

Thread Tools
 
Search this Thread
 
Old Sep 16, 2002 | 02:14 PM
  #1  
ADP's Avatar
ADP
Thread Starter
Scooby Regular
 
Joined: Apr 2001
Posts: 3,823
Likes: 1
Question

Hi guys ,

Struggling a bit on a batch file.

All it has to do is copy backup.zip from local location (NT server)

f:\blah\blahblah\backup.zip

to a server location \disk5\andyp\ on a local ip 192.168.2.105 (Solaris machine)

could anyone help? Im struggling around the open bit and entering user name and password.

cheers for any ideas or links


andy




[Edited by ADP - 9/16/2002 2:14:54 PM]

[Edited by ADP - 9/16/2002 2:25:04 PM]
Reply
Old Sep 16, 2002 | 02:18 PM
  #2  
ScoobydoobyDave's Avatar
ScoobydoobyDave
Scooby Regular
 
Joined: Dec 2001
Posts: 1,693
Likes: 0
From: Herts
Post

Think you would have to use the 'net use' command within NT, basically you map to the drive with net use, copy your file then disconect the mapped drive

(I would explain further, but im not at work, and no NT here to mess around with!)

hope that helps a bit!

Dave.
Reply
Old Sep 16, 2002 | 02:22 PM
  #3  
ADP's Avatar
ADP
Thread Starter
Scooby Regular
 
Joined: Apr 2001
Posts: 3,823
Likes: 1
Post

I need to set this up as a weekly scheduled task btw !
Reply
Old Sep 16, 2002 | 02:22 PM
  #4  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

how about...

copy f:\blah\blahblah\backup.zip \\192.168.2.105\disk5\andyp

assuming that you have authenticated and that disk5 is a valid share name.... drop me a mail if you get stuck to david.wallis@ventura-uk.com

David
Reply
Old Sep 16, 2002 | 02:27 PM
  #5  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

or

@echo off
Net use z: /delete
net use z: \\192.168.2.105\disk5 /user:username password**
copy f:\blah\blahblah\backup.zip z:\andyp
net use z: /delete

** where password is your password... (not right secure though)
if you want it a tiny bit more secure, run bat2exe / bat2com.. but
you can easily find it out...

David


Reply
Old Sep 16, 2002 | 02:32 PM
  #6  
ADP's Avatar
ADP
Thread Starter
Scooby Regular
 
Joined: Apr 2001
Posts: 3,823
Likes: 1
Post

cheers David

will this work with solaris as the server as Im copying to??

thanks


andy
Reply
Old Sep 16, 2002 | 02:44 PM
  #7  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

doubt it.. unless you can run something like samba or whatever it is... if it wont then you'd be better ftp'ing it rather than trying to do a copy over netbios etc..

David
Reply
Old Sep 16, 2002 | 02:49 PM
  #8  
ADP's Avatar
ADP
Thread Starter
Scooby Regular
 
Joined: Apr 2001
Posts: 3,823
Likes: 1
Post

looks like its an ftp then, so my next problem - how to do that command line style... I know how to do it in dos ie

ftp
open
192.168.2.104
username
password
cd lcd or whatever
bin
then get or put


however cant make it work in the batch file


andy


Reply
Old Sep 16, 2002 | 02:54 PM
  #9  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

ftp -s:script.txt -i 192.168.x.x

then script.txt
username
password
bin <-if needed
cd "Foldername"
put "whatever"
bye


you get the picture...

David
Reply
Old Sep 16, 2002 | 02:55 PM
  #10  
chiark's Avatar
chiark
Scooby Regular
 
Joined: Jun 2000
Posts: 13,735
Likes: 0
Post

For weekly scheduled, read the AT comment help...
Reply
Old Sep 16, 2002 | 02:58 PM
  #11  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

**** that get winat.exe from the res kit..

David
Reply
Old Sep 17, 2002 | 10:43 AM
  #12  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

did it work?

David
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
yabbadoo4
ScoobyNet General
11
Sep 30, 2015 10:33 PM
Nick_Cat
Computer & Technology Related
2
Sep 26, 2015 08:00 AM
Littleted
Computer & Technology Related
0
Sep 25, 2015 08:44 AM
ALi-B
Computer & Technology Related
0
Sep 14, 2015 07:49 AM
riiidaa
ScoobyNet General
1
Sep 12, 2015 11:52 AM




All times are GMT +1. The time now is 09:48 PM.