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 7503037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:04:56+00:00 2026-05-29T21:04:56+00:00

When i try to copy the file from local machine to other machine within

  • 0

When i try to copy the file from local machine to other machine within the local network, through file.copy() method in c#, i am encountered with the error saying, The given path’s format is not supported

I am using the following syntax

File.Copy(@"C:\temp\sample.txt", @"\\DEMO-PC\D:\DummyFolder\sample.txt", true);
  • 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-05-29T21:05:01+00:00Added an answer on May 29, 2026 at 9:05 pm

    Try replacing the colon with a dollar sign:

    File.Copy(@"C:\temp\sample.txt", @"\\DEMO-PC\D$\DummyFolder\sample.txt", true);
    

    EDIT

    The ‘:’ character has a special status in Windows paths; it’s not legal to use it in the name of a file share. The ‘$’ character also has a special status: it is used to designate hidden shares. Windows automatically creates hidden file shares for each drive on a computer; omitting the colon because it’s not legal, and adding the ‘$’ to hide the share.

    See this knowledge base article for more information: http://support.microsoft.com/kb/314984

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
I am writing a bash script to copy a file from a remote server,
Whenever I try to copy an entire working copy using simple drag and drop
I try to do the following: Detach the database Copy files to a temporary
Try as I might, I can't get a JNLP file to run locally (via
I want to read 4GB file & create a copy of it by making
I get this error repeatedly when developing ASP.Net applications: Cannot create/shadow copy 'XXXXX' when
I try to add some C/C++ sources into JNI folder by dragging from explorer
Note: I have read through the last 150 svn commit error questions and none
When I try to check out trunk/ from one of the Subversion repos, the

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.