Computer Hope

Microsoft => Microsoft DOS => Topic started by: Deuxdad on April 14, 2011, 04:42:46 PM

Title: Network access from batch file
Post by: Deuxdad on April 14, 2011, 04:42:46 PM
I have a file called "database.kdb" located in the SHARED folder on my desktop computer.  I need to be able to copy that file to a Win 7 laptop using a batch file running on the Win 7 laptop.  The file location on the desktop computer is: C:\Documents and Settings\All Users\Documents\database.kdb.  The location of the file as seen from the Win 7 laptop Windows Explorer is:

► NETWORK ► BLACK ►DOCUMENTS ►

Right-clicking on the file on the laptop and selecting PROPERTIES shows the file's path as:

\\BLACK\Documents (note the double backslashes in front).

So, how do I construct the DOS copy command so that the batch file can find the file to copy it?

TIA,
Jack
Title: Re: Network access from batch file
Post by: Geek-9pm on April 14, 2011, 05:25:58 PM
Welcome!
Computer Hope is the number one location for free computer help.

Not sure what you want to do and why you want to use a batch.
Have you looked in the database here?
Network access from batch file (http://www.computerhope.com/search.htm?cx=003411668307610607965%3Ah4yba8pbdco&cof=FORID%3A9%3BNB%3A1&q=Network+access+from+batch+file&sa=Search#1346)

This question has been asked many times. One method is to map network share as a virtual drive on the client PC. Look over the links above and come back here if you don't find a solution.


Title: Re: Network access from batch file
Post by: Deuxdad on April 15, 2011, 10:32:47 AM
I'm sorry if I made my question more complicated and/or confusing  than it had to be.  In any event, your suggestion: "One method is to map network share as a virtual drive on the client PC." made absolutely no sense to me as I obviously do not possess the requite knowledge to understand such a statement.

All that aside, I was able to devise an answer to my question based on things I read in the link you sent.  The resulting batch file command ended up being:

copy \\Black\Documents\"Database.kdb" C:\"Program Files (x86)"\"KeePass Password Safe"

So... All's well that ends well.

Many thanks,
Jack