Batch file help?
#1
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]
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]
#2
Scooby Regular
Join Date: Dec 2001
Location: Herts
Posts: 1,693
Likes: 0
Received 0 Likes
on
0 Posts
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.
(I would explain further, but im not at work, and no NT here to mess around with!)
hope that helps a bit!
Dave.
#4
Scooby Regular
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
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
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
#5
Scooby Regular
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
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
@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
#7
Scooby Regular
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
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
David
Trending Topics
#8
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
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
#9
Scooby Regular
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
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
then script.txt
username
password
bin <-if needed
cd "Foldername"
put "whatever"
bye
you get the picture...
David
Thread
Thread Starter
Forum
Replies
Last Post