Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Software to move folders

Posted on 2008-06-10
6
Medium Priority
?
200 Views
Last Modified: 2010-04-21
I am looking for some type of software that I can use to schedule an automatic move of files from one MS server to another MS server.  Does anybody know of any software like that?  Thanks for your help!
0
Comment
Question by:hjmission
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 32

Expert Comment

by:r-k
ID: 21752399
Assuming the files are not "in use" at that time, you should be able to do this by just putting a couple of commands in a batch file and scheduling it to run at time you want.

Namely:

  xcopy to copy the folder and its subfolders.
  del to delete the folders that have been copied.

You will want to put in some logic to not do "del" if any of the xcopy failed. And carefully test something like this to avoid losing files.
0
 
LVL 1

Author Comment

by:hjmission
ID: 21752456
r-k    will that move a complete folder?  Can you use a wildcard with that?
0
 
LVL 32

Accepted Solution

by:
r-k earned 2000 total points
ID: 21752794
Yes, you can move entire folders and sub-fodlers within, with the xcopy command. For example:

 xcopy J:\myfolder\*.* /s/e K:\myfolder\ /c/f/h/d/y

will move everything in \myfolder\ on the J: drive to a corresponding folder on the K: drive, including all sub-folders below \myfolder\

The switches I used above are:

Rem       /s  means all subdirectories also
Rem       /e  means empty folders also
Rem       /c  means ignore errors
Rem       /f  means full display in console window
Rem       /h  means hidden files also copied
Rem       /d  means copy only those files that have changed
Rem       /y  means do not prompt for overwriting existing files

Type "xcopy /?" at a command prompt to see other options.

In your case you may want to leave out the /c switch so you don't ignore errors. Another useful option is /exclude where you can have a list of files withing those folders you don't want want copied.

Be sure not to run the "del" command if the xcopy encounters any error (network down e.g.).

There is a limitation of the xcopy command that you should be aware of. It cannot copy files with the path or name longer than a certain length (128 or 256, I forget which). You can check if this applies in your case by running a test run of xcopy on the folders of interest.

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:hjmission
ID: 21752919
r-k      this looks like what i am wanting.  Can I run this command with something like Task Scheduler so I can get it done everyday?
0
 
LVL 32

Expert Comment

by:r-k
ID: 21753756
Yes, you can put all your commands in a file named "something.bat", then schedule it with the task scheduler like any other program.

Testing and error checking are important, of course.

I have to run but I'll post some tips later on how you can save a log of what gets copied, and an error log.

You can also include a command to map a network drive in the same command/batch file.
0
 
LVL 1

Author Closing Comment

by:hjmission
ID: 31468926
r-k  thanks for all of your help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

609 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