May 25, 200521 yr @ tguy - We're not creating anything, just moving stuff from individual user profile directories to the 'All Users' profile directory. This is because all the installed programs etc. will put shortcuts in various places.As an additional note, with regards the moving of profile subdirectories, if you later create a new user, first logon will put stuff in their profile directory too. This would probably mean that you may wish to consider emptying contents of 'Default User' too! This is of course a hidden directory, and alterations in the code would need to be made in order to include it.
September 5, 200817 yr I got it to work like this:@echo offcd "%UserProfile%\.."for /d %%a in ("%UserProfile%\..\*") do if "%%~na" neq "All Users" call :doit "%%~a"goto :eof:doitpushd %1robocopy "Start Menu\." "%AllUsersProfile%\Start Menu" /E /Z /MOVE /R:5 /W:2 /XF ?esktop.ini>nulpopdgoto :eofHow do you do the "Default User" folder too?What does "%%~na" and "%%~a" do?
September 5, 200817 yr ok this moves all the shortcuts:@echo offcd "%UserProfile%\.."for /d %%a in ("%UserProfile%\..\*") do if "%%~na" neq "All Users" call :doit "%%~a"goto :dup:doitpushd %1robocopy "Start Menu\." "%AllUsersProfile%\Start Menu" /E /Z /MOVE /R:5 /W:2 /XF ?esktop.ini>nulpopdgoto :eof:duprobocopy "%userprofile%\..\default user\Start Menu\." "%AllUsersProfile%\Start Menu" /E /Z /MOVE /R:5 /W:2 /XF ?esktop.ini>nulBut I am still wondering what "%%~na" and "%%~a" mean. I can't get any search engines to find % or ~ symbols.
Create an account or sign in to comment