Solved

C# how do I move a folder?

Posted on 2010-08-18
2
271 Views
Last Modified: 2013-12-17
I will have a folder called batch, in it there are other folders request1, request2, request3....
When a folder has been processed, I want to move it from batch to processed.
How can I do this?
Also, these folders will be very large.  Will there be an issue moving them if they are on the same level as batch?

so
batch .....processed on the same level

in batch there will be request1, 2, 3 ...
0
Comment
Question by:jackjohnson44
2 Comments
 
LVL 10

Accepted Solution

by:
Jini Jose earned 250 total points
ID: 33469960
is the folder having subdirectories ?

System.IO.Directory.Move(@"c:\batch\request1", @"C:\processed\request1");

Open in new window

0
 
LVL 14

Assisted Solution

by:systan
systan earned 250 total points
ID: 33470030
Moving a file or folder is the same as renaming it.

//Folder
System.IO.Directory.Move(@"c:\batch\request1", @"C:\processed\request1");

//File
System.IO.File.Move(@"c:\request.xml", @"c:\processing.xml");
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
location of a form 2 25
Please explain purpose of GZIP 4 37
Get month and date in a format 4 35
.NET Enums [Flags] & Bitwise Design Question 6 30
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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