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 16 September 2002, 02:14 PM
  #1  
ADP
Scooby Regular
Thread Starter
 
ADP's Avatar
 
Join Date: Apr 2001
Posts: 3,823
Likes: 0
Received 1 Like on 1 Post
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]
Old 16 September 2002, 02:18 PM
  #2  
ScoobydoobyDave
Scooby Regular
 
ScoobydoobyDave's Avatar
 
Join Date: Dec 2001
Location: Herts
Posts: 1,693
Likes: 0
Received 0 Likes on 0 Posts
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.
Old 16 September 2002, 02:22 PM
  #3  
ADP
Scooby Regular
Thread Starter
 
ADP's Avatar
 
Join Date: Apr 2001
Posts: 3,823
Likes: 0
Received 1 Like on 1 Post
Post

I need to set this up as a weekly scheduled task btw !
Old 16 September 2002, 02:22 PM
  #4  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
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
Old 16 September 2002, 02:27 PM
  #5  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
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


Old 16 September 2002, 02:32 PM
  #6  
ADP
Scooby Regular
Thread Starter
 
ADP's Avatar
 
Join Date: Apr 2001
Posts: 3,823
Likes: 0
Received 1 Like on 1 Post
Post

cheers David

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

thanks


andy
Old 16 September 2002, 02:44 PM
  #7  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
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
Old 16 September 2002, 02:49 PM
  #8  
ADP
Scooby Regular
Thread Starter
 
ADP's Avatar
 
Join Date: Apr 2001
Posts: 3,823
Likes: 0
Received 1 Like on 1 Post
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


Old 16 September 2002, 02:54 PM
  #9  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
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
Old 16 September 2002, 02:55 PM
  #10  
chiark
Scooby Regular
 
chiark's Avatar
 
Join Date: Jun 2000
Posts: 13,735
Likes: 0
Received 0 Likes on 0 Posts
Post

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

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

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

did it work?

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



Quick Reply: Batch file help?



All times are GMT +1. The time now is 04:51 AM.