Solved

How to copy file using command line to client using RDP and shared drive

Posted on 2008-10-30
3
2,133 Views
Last Modified: 2013-11-21
Hello,

We have setup a TS2008 and we want to copy file from server to the client using command line, we already add my printer and drives as ressource that I want to load to the server. On the TS session I can see my drive name D on PC1. using windows explorer I'm able to copy file using copy-paste. But i'm unable to copy the file directly to my computer using command line.

Our purpose is that we are generating a print file from one of our software to print bar code label directly to a zebra printer that will be connected to the client computer. On the client side we use the following command : "copy prnfile /b \\computername\printername". We are trying to do the same on the TS. If it is not possible to copy the file directly to the printer we want to copy it to the remote drive. I already try this command : "copy file \\pc1\d\file"  and "copy file \\pc1\d$\file" but without success
0
Comment
Question by:jfmador
  • 2
3 Comments
 
LVL 16

Expert Comment

by:DansDadUK
ID: 22840725
I think that you can only copy to a share-name; so, with \\computername\printername, "printername" must be set up as a share name on 'computername' (and perhaps limited to 8 characters in length?).

I'm not sure whether or not similar restrictions apply to copying to a target file (I have no knowledge, or experience, of TS); i.e. you can perhaps copy a file to a named share, but not identify the target file itself?.
0
 
LVL 5

Author Comment

by:jfmador
ID: 22852481
I was able to copy to a mapped drive using \\tsclient\d, I presume that tsclient is a system variable or that it is handled another way by windows

But i'm still unable to copy a prn file using \\tsclient\printername or \\tsclient\printerport

0
 
LVL 5

Accepted Solution

by:
jfmador earned 0 total points
ID: 22885651
I was able to copy to a printer

You can go on your TS Session in your printer property, look into port, the port description you will have your computer name : PRN##

you can use this prn number in the copy command   copy prnfile \\tsclient\prn##

0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Upgrading from SBS2003 to Windows Server 2012r2 Essentials 13 43
Windows IPv6 DHCP server 8 59
SBS 2008 Standard OEL 2 28
Interactive Script in Scheduled Task not running 8 28
Know what services you can and cannot, should and should not combine on your server.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question