ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: MoveAllTo C:\olddata

(1/2) > >>

moongoon:
Seems simple but I've never seen a good solution to this.

Before reinstalling XP I like to *move* the contents of C to C:\OldData.  This greatly aids in installing a fresh, clean copy of Windows.  I'd use this in a WinPE environment so no worries about NTFS or locked files.

Can be a Win32 console application.  Doesn't really need a GUI.  Something like:

Name of Tool    NAME OF TARGET FOLDER (Create if not Present)
MOVEALLTO     C:\OLDDATA

I've heard ROBOCOPY can do this but my mind reels at learning all the syntax :p

Thanks in advance for your consideration!

chedabob:
done  ;D

http://chedabob.com/moveall.bat

youd be surprised how simple it was :P

before you run it, be aware, i cannot be held responsible if it goes nuts up. I shouldnt see why it would, but please, test it on some files that aren't critcal. It successfully moves c:\ati to c:\bleh on my machine, but I dont have enough space to test it on my machine

edit1: just tested it on my other drive. It worked fine.

moongoon:
Thanks for the attempt!

However I get a:
Cannot move multiple files to a single file error.

The batch file doesn't create the OLDDATA folder.  Nor does it copy system files. It also does not move the subdirectories over.  Shell commands can also be much slower than direct access to Win32API.

I too had forgotten the limitations of the MOVE command.  It was a good thought though!  Thanks again for trying :)

P.S.  I noticed a mention of C# in your member details.  Maybe this code snack would be a good way to beef up your coding skills?  Try looking at this link for help on dealing with files and folders under C#
http://www.codeguru.com/Csharp/Csharp/cs_syntax/anandctutorials/article.php/c5861/

cthorpe:
Could it be as easy as:


--- ---robocopy .\ c:\OldData\ /E /MOVE
 run from the root of C:\

C

moongoon:
Thanks for the input cthorpe!

That gets me closer to using ROBOCOPY.  However, it still balks at some system files or files with weird permissions.  It goes into a loop of Access is Denied.  Waiting 30 seconds..  I guess that means using the /ZB switch eh?

The reason why I think this would be better implemented as a program is that Windows Explorer can create an OLDDATA folder and move all the other folders and files into it in an instant.  Explorer must be using some shortcut to expedite the process and bypass those permission issues.  Maybe it directly accesses the MFT table (I'm no expert).  Maybe it uses standard calls *shrugs*

Thanks again for lending your brains :)

@cthorpe:  Doomo Arigato for the tip.  I did not know XXCOPY could do that!  Will try it out..

Navigation

[0] Message Index

[#] Next page

Go to full version