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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:20:27+00:00 2026-05-12T23:20:27+00:00

Let: Folder to rename c:\temp\Torename to: c:\temp\ToRename Directory.Move does not work because the folder(:\temp\Torename)

  • 0

Let:
Folder to rename
c:\temp\Torename
to:
c:\temp\ToRename

Directory.Move does not work because the folder(:\temp\Torename) already exist.

I am looking for a solution that does not involve creating a temp folder.
I have this solution in place:
Move to a temp folder (unique name) eg c:\temp\TorenameTemp
Move from temp folder to new folder. eg c:\temp\ToRename
The problem is that my folder can get very big and move can take some time to execute. I like windows explorer solution in which user renames on the spot regardless of size.

thanks for yor time.

  • 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-12T23:20:27+00:00Added an answer on May 12, 2026 at 11:20 pm
    Directory.Move(@"C:\Temp\Dir1", @"C:\Temp\dir1_temp");
    Directory.Move(@"C:\Temp\dir1_temp", @"C:\Temp\dir1");
    

    The files won’t be moved unless you are moving them to a different volume. If destination is on the same volume, only the name of directory will change.

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

Sidebar

Related Questions

Let's say I uploaded an image. I can get its temp directory, then save
Please let me know what are default locations for Downloads folder on devices with
Is it possible to let a SQL Server watch a folder for .mdf files
I need to let users of an application open a folder by clicking a
Let me try to explain by example. Say website is hosted at example.com (NOT
I have a Windows Form application. What this application does, is let the user
I'm not sure what exactly i'm doing wrong here...but i noticed that my File.Move()
I am having lots of images as frames in my resources/drawable folder (let say
Let's say I've got a folder in my project with bunch of png files
I want to rename all the files in a folder which starts with 123_xxx.txt

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.