Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Network access from batch file  (Read 5698 times)

0 Members and 1 Guest are viewing this topic.

Deuxdad

    Topic Starter


    Rookie

    • Yes
  • Experience: Experienced
  • OS: Windows 10
Network access from batch file
« 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
Deuxdad

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Network access from batch file
« Reply #1 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

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.



Deuxdad

    Topic Starter


    Rookie

    • Yes
  • Experience: Experienced
  • OS: Windows 10
Re: Network access from batch file
« Reply #2 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
Deuxdad