• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 125
  • Last Modified:

copying files from network automatically

I have a LAN where I have to copy alot of files from the LAN to my computer.  Basically, I use IE and explore the IP of the server, login to the server and start copying files manually from each user 1 by 1.  It is very time consuming because I need to navigate the webpages for each user and also identify the files manually.

My question is, how can I automate this process?  ie, write a program that access and copies the file given a search path (ie "//user1/directory/myfile1") to a local directory (ie "c:\user\user1\").

This copying must be repetative.  ie, can be used to copy 30 user's file at 1 go.  What is my best approach?  Any examples?  Any freeware programs that does this?

I don't know how difficult this will be, so if you think you deserve more points, please advice me accordingly.  cheers!

regards
Yam
0
YamSeng
Asked:
YamSeng
1 Solution
 
makerpCommented:
do you use HTTP or FTP.. you could automate this with Windows Scripting Host probably.
0
 
YamSengAuthor Commented:
I'm using HTTP browser to access the files currently.
0
 
YamSengAuthor Commented:
let me clarify a bit.  Actually, I use HTTP browser and connect to a particular IP in my intranet.  It will prompt for login (message box will pop up).  

Upon logging in, I will see a webpage with a extension of *.aspx.  Upon selecting the group on this aspx form, it'll open up a explorer window and show me the files in this group.  

From there, I usually copy and paste it onto my local drive.

Yam
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
bonzaiCommented:
Hi YamSeng

Create a Batchfile with following content:

REM--------------begin--------------
set srcpath=c:\filestocopy\*.*
set Dstpath=c$\temp\test\*.*

FOR /F "tokens=1* delims=" %%j in (pcnames.txt) do (xcopy "%srcpath%" "\\%%j\%dstpath%")
REM---------------end---------------

srcpath = the path where your files are from
dstpath = tha path where you want your files to be copied

note that all your clients will need to have the default share (c$) and you need write access to this (an admin should have these...)

Then, create a resource-file named pcnames.txt. in this file, write your computernames or IP's of your destination computers (ie. COMPUTER1 or 192.168.0.1)

This example will copy everything in your "filestocopy" directory to every computer's (defined in pcnames.txt) :\temp\test directory

Advise: First try with some testmachines ;-)

hope this helps
bonzai

0
 
bonzaiCommented:
ex. of pcnames.txt:


--------pcnames.txt-------
COMPUTER1
COMPUTER2
COMPUTER3
--------pcnames.txt-------
0
 
YamSengAuthor Commented:
what about if I need to selectively copy certain files? ie, files like

??_testing.doc

where ? is any character?

or

*_testing.doc

where * is the wildcard?
0
 
bonzaiCommented:
just put it in the SRCPATH variable...

set srcpath=c:\filestocopy\*.*
0
 
cempashaCommented:
This question is still open and getting old. If any of the comment(s) above helped you please accept it as an answer or split the points who ever helped you in this question. Your attention in finalising this question is very much appreciated. Thanks in advance,

****** PLEASE DO NOT ACCEPT THIS AS AN ANSWER ********

- If you would like to close this question and have your points refunded, please post a question in community support area on http://www.experts-exchange.com/Community_Support/ giving the address of this question. Thank you      

Pasha

Cleanup Volunteer


0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now