Solved

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

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
A short article about a problem I had getting the GPS LocationListener working.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now