Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:47:42+00:00 2026-06-12T01:47:42+00:00

I am copying an .MSI file to a remote PC. The copy-item is not

  • 0

I am copying an .MSI file to a remote PC. The copy-item is not retaining the filename or extension at the remote destination. I thought copy-item would copy the file as is?

The script:

net use Q: \\remotePC\C$\Temp /user:USERID PSWD
copy-item C:\TEMP\installation.msi -Destination Q:\Temp
dir Q:\
net use Q: /delete

What the destination directory contains after the copy, a file called “Temp” with no extension.

    Directory: Q:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---          8/8/2012   3:57 PM   18900480 Temp

If I try to literally specify the filename in the destination of the copy-item cmd I get the following error:

net use Q: \\remotePC\C$\Temp /user:USERID PSWD
copy-item C:\TEMP\installation.msi -Destination Q:\Temp\installation.msi
dir Q:\
net use Q: /delete

Error:

Copy-Item : Could not find a part of the path 'Q:\Temp\installation.msi'.
At P:\Powershell\CopyInstallFile\copyinstall.ps1:10 char:10
+ copy-item <<<<  C:\TEMP\installation.msi -Destination Q:\Temp\installation.msi
    + CategoryInfo          : NotSpecified: (:) [Copy-Item], DirectoryNotFound
   Exception
    + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.P
   owerShell.Commands.CopyItemCommand

================================================================
EDIT – If I specify the full network path it copies the file correctly. Apparently the copy-item doesn’t like to use drives created by net use

copy-item C:\TEMP\installation.msi \\remotePC\C$\Temp
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:47:43+00:00Added an answer on June 12, 2026 at 1:47 am

    You’ve mapped Q: to the c:\Temp folder on the other machine. That means that Q:\ points to the temp directory already. Just just copy to Q:\ instead of Q:\Temp and it should work.

    copy-item C:\TEMP\installation.msi -Destination Q:\
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am copying a file from a remote server using copy (and also tried
Copying a File using a straight-forward approach in Python is typically like this: def
I'm copying a Magento Enterprise 1.11.2.0 core file called Preview.php into the local folder
I'm having trouble copying a file and then verifying the integrity of the file
I am copying a file to a directory, and then setting an environment variable
I'm copying ListViewItems from one ListView to another, sth. like: foreach (ListViewItem item in
I have problem with copying sdf file to WM emulator. My solution structure MyApp.DataLayer
Copying an array would create a new instance of the array, but the objects
I copying the sample rss from http://www.apple.com/itunes/podcasts/specs.html and pasting it to my html file
When copying a known struct in memory, would you prefer using memcpy or dereference?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.