Solved

Need script to move documents/music/videos to different partition/delete temp files

Posted on 2011-09-17
3
293 Views
Last Modified: 2012-05-12
I have an hp mini with a 16GB ssd flash module. I cannot find a larger module for an affordable price so I purchased a 32GB SDHC that I've installed for additional storage. Windows will not allow me to use folders on that removable disk as the location for those special folders without having to jump through a bunch of hoops. So I am thinking a script would be easiest. I want to move all files in those special folders to folders I've created on the expansion disk and delete all files and subfolders in temp folders.
0
Comment
Question by:J C
[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
  • 2
3 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 36556156
Hi, you need to be more specific about what files you want to move where.....then we may be able to help.

Please give examples of what you want to do.

Rob.
0
 

Author Comment

by:J C
ID: 36557946
I'd like to move everything that gets saved to the desktop/my documents folder/music and video folders as well and then to make sure the temp folders are cleared out as well.

ie. All files that get saved in c:\users\me\desktop gets moved to e:\desktop
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 36558077
Do you just want this to happen as a once off procedure?  And then just delete %userprofile%\AppData\Local\Temp for that profile?

You could do that with a batch file:
if exist "%userprofile%\AppData\Local\Temp" del /q "%userprofile%\AppData\Local\Temp\*"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Desktop" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Documents" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Favorites" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Links" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Music" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Pictures" "E:\"
xcopy /E /C /I /Q /G /H /R /Y "%userprofile%\Videos" "E:\"

Open in new window


Rob.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

636 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