How do I move C:\Windows\$NtUninstall and its contents to anotherfolder using a batch file excluding

R

rebelscum0000

Is there any other way to do this without installing Windows Server
2003 Resource Kit Tools and use robocopy?

I just want to move NOT copy C:\Windows\$NtUninstall...... folders
(hidden), With the exception of the folder $hf_mig$ to a other folder
lets called it C:\Backup\

I have a problem with this code in my .bat:

@ECHO OFF
for /F "tokens=*" %%D in ('dir %SystemRoot%\$* /b /a:d ^| find /v
"$hf_mig$" ') do (
md C:\Backup\%%~nxD 2>nul
robocopy %%~fD\ C:\Backup\NtUninstal\%%~nxD\ /MOVE
)

have an invalid Parameter #3

Started:
Source - C:\Documents\
Dest - C:\Documents and Settings\MyName MyLastName\Desktop\and\

-----------------------

Error: Invalid Parameter #3 : “Settings\MyName”

Can someone please help

Thank you very much in advance
 
R

rebelscum0000

Why not copy them, and then delete the files in the Windows folder. I
never, well, almost never use move. I copy and then delete. It just
feels safer to me.

Yes, Copying and deleting them is unwise but is just for a test
 
Z

Zaphod Beeblebrox

Is there any other way to do this without installing Windows Server
2003 Resource Kit Tools and use robocopy?

I just want to move NOT copy C:\Windows\$NtUninstall...... folders
(hidden), With the exception of the folder $hf_mig$ to a other
folder
lets called it C:\Backup\

I have a problem with this code in my .bat:

@ECHO OFF
for /F "tokens=*" %%D in ('dir %SystemRoot%\$* /b /a:d ^| find /v
"$hf_mig$" ') do (
md C:\Backup\%%~nxD 2>nul
robocopy %%~fD\ C:\Backup\NtUninstal\%%~nxD\ /MOVE
)

have an invalid Parameter #3

Started:
Source - C:\Documents\
Dest - C:\Documents and Settings\MyName MyLastName\Desktop\and\

-----------------------

Error: Invalid Parameter #3 : “Settings\MyName”

Can someone please help

You might try in alt.msdos.batch.nt or
microsoft.public.windows.server.scripting, lots of smart batch folks
hang out in those groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top