Jump to content
Sign in to follow this  
ahmad07

Dos Command Utk Copy File Melalui Network

Recommended Posts

salam..

aku ade 100 bijik komputer yg semuanya connected melalui LAN... kesemua komputer ni ade username:abu dan password:1234... kesemua content kat folder D:\WORK mesti sama utk kesemua 100 bijik komputer ni...

kadang2 aku buat perubahan kat komputer A dalam folder D:\WORK\project1\file.txt tu, lepas tu aku kene copy secara manual ke semua 99 bijik lagi komputer supaya content die sama...

ade tak cara utk aku double click jer file *.bat dan DOS command tu execute command utk tolong aku copy file yg aku wat perubahan tu ke semua 100 bijik komputer tadi?

thanx in advance. :)

Share this post


Link to post
Share on other sites
[quote name='ahmad07' date='07 March 2010 - 10:18 PM' timestamp='1267971486' post='1020524']
salam..

aku ade 100 bijik komputer yg semuanya connected melalui LAN... kesemua komputer ni ade username:abu dan password:1234... kesemua content kat folder D:\WORK mesti sama utk kesemua 100 bijik komputer ni...

kadang2 aku buat perubahan kat komputer A dalam folder D:\WORK\project1\file.txt tu, lepas tu aku kene copy secara manual ke semua 99 bijik lagi komputer supaya content die sama...

ade tak cara utk aku double click jer file *.bat dan DOS command tu execute command utk tolong aku copy file yg aku wat perubahan tu ke semua 100 bijik komputer tadi?

thanx in advance. :)
[/quote]
Walaikumsalam..

boleh, ko boleh bina satu batch file misal nama nya salin.bat
dalam batch fail tu ko tulis arahan copy sepertimana ko tulis pada command prompt.


setelah itu, ko hanya taip salin sahaja, batch fail tu akan menjalankan semua arahan yang ko telah tulis tadi.


selamat mencuba. ;)

Share this post


Link to post
Share on other sites
[quote name='TJ-Ariff' date='09 March 2010 - 05:47 PM' timestamp='1268128054' post='1020762']
Walaikumsalam..

boleh, ko boleh bina satu batch file misal nama nya salin.bat
dalam batch fail tu ko tulis arahan copy sepertimana ko tulis pada command prompt.


setelah itu, ko hanya taip salin sahaja, batch fail tu akan menjalankan semua arahan yang ko telah tulis tadi.


selamat mencuba. ;)
[/quote]

arahan utk copy kalo dalam same komputer takde masalah.. cuma arahan utk copy ke network yg ade username ngan password tu yg aku tak pasti caner nak tulis... ade idea??

Share this post


Link to post
Share on other sites
[code]net use \\server\share /user:<domain\username> <password>[/code]

[code]xcopy "\\Client1\C\Documents and Settings\file.txt" C:\Backup /y[/code]







=======================
B) Edited by TJ-Ariff
Penyesaian Terbaik !

Share this post


Link to post
Share on other sites
backup.bat
----------
[code]@echo off
for %%a in (pclist.txt) do (
net use \\%%a\ipc$ /user:<domain\username> <password>
xcopy "\\PC\D$\WORK\project1\file.txt" \\%%a\D$\WORK\project1
)
[/code]


pclist.txt
----------
PC1
PC2
PC3
..
...
....
PC100

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...