Web Hosting, Design, & Coding forum

General discussion

Network batch file help

I am trying to make a batch file that will :
1)allow user input for the destination of the network computer to copy files from

2) copy a file from the unit POS to the destination

heres what I have so far can you help me with what im missing

@Echo off
SET /P POS=[Enter the POS to copy files from]
** DEL "C:\Documents and Settings\All Users\Desktop\*.*"
XCOPY "%POS%\Documents and Settings\All Users\Start Menu\Programs\Startup\test.txt" "C:\Documents and Settings\All Users\Desktop\"/y

for the format of the pos to copy from i can enter either


Discussion is locked
You are posting a reply to: Network batch file help
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Network batch file help
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Never going to happen.

In reply to: Network batch file help

The DOS batch programming language doesn't have a feature to input a variable so given only the old DOS batch programming language you won't get this done.

Collapse -
Research is the key

In reply to: Never going to happen.

Might think about some research before you answer questions.
quite possible and after some messin around got it workin like a charm

SET /P POS=Enter the POS to copy files from:
DEL /q "C:\Documents and Settings\All Users\Desktop\*.*"
COPY "\\%POS%\c\Documents and Settings\All Users\Start Menu\Programs\Startup\StartPOS.cmd" "C:\Documents and Settings\All Users\Desktop\"

Collapse -
SET /P doesn't work in DOS.

In reply to: Research is the key

Next time tell exactly which command interpreter was going to be used.

The /P failed on my old Windows 98 machine but worked on XP.

Popular Forums

Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


This one tip will help you sleep better tonight

A few seconds are all you need to get a better night's rest.