Solved

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

Posted on 2011-09-17
3
290 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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …

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