| Windows 7: Batch file to move desktop icons so ALL are sorted. |
19 Mar 2012
|
#1 | | Windows 7 Home Premium 64bit |
Batch file to move desktop icons so ALL are sorted. Windows 7 stores desktop icons in two different folders:
C:\Users\Public\Public Desktop
C:\Users\UserName\Desktop
This results in two groups of sorted icons on the desktop. I want to move all of the icons in the "C:\Users\Public\Public Desktop" to the "C:\Users\UserName\Desktop". This will result in ALL of the desktop icons being sorted.
I want to use a batch file to do the move. Then click on a desktop icon to run the batchfile. How can I do this?
----------
The batch file I've come up with is named "movicons.bat" as follows:
rem @echo off
move "C:\Users\Public\Public Desktop\*.*" C:\Users\Dad\Desktop
I created a desktop shortcut named "MovIcons" with the target as:
D:\Batfiles\movicons.bat
But when I click that desktop icon, the icons are not moved. Need help to get it all working.
Thanks,
Skyzoomer
Last edited by Skyzoomer; 19 Mar 2012 at 02:38 PM..
Reason: changed D:\Batchfiles\movicons.bat to D:\Batfiles\movicons.bat
| My System Specs |
| OS Windows 7 Home Premium 64bit |
19 Mar 2012
|
#2 | | 7 Ultimate x64/7 Home Premium x64 Polk County, Central Florida |
I'm not quite sure what your goal is here.
Do you have duplicate icons on C:\Users\Dad\Desktop? | My System Specs | | System Manufacturer/Model Number Dell Inspiron 580 OS 7 Ultimate x64/7 Home Premium x64 CPU Intel i3 550 3.2 GHz Motherboard Dell/Intel H57 Memory Corsair 16 GB DDR3 (4 X 4GB) Graphics Card Intel HD Graphics Sound Card Intel P55 HD Audio Monitor(s) Displays LG E2360 LED Screen Resolution 1920 X 1080 Keyboard Microsoft Wireless Comfort Keyboard 5000 Mouse Microsoft Wireless Mouse 5000 PSU Dell 300W Case Dell Inspiron Cooling Dell/Intel Hard Drives Seagate 1TB X 2 Internal,
Seagate 1TB eSATA (Backup) Internet Speed 4,000 Mbit DSL Other Info Custom Installation -
OS separate on C:
Pagefile Separate on P:
Program Files Separate on U:
Users and ProgramData separate on V: |
19 Mar 2012
|
#3 | | MS Windows 7 Ultimate 64-bit SP1 Somewhere in the middle of Desert :-) |
Try this batchfile.
rem @echo off
move C:\Users\Public\Desktop\*.* C:\Users\Dad\Desktop | My System Specs | | System Manufacturer/Model Number Toshiba Satellite P775-S7232 OS MS Windows 7 Ultimate 64-bit SP1 CPU i5-2410M 2.3GHz (2.9GHz Turbo-Boost) Sandy Bridge 32nm Motherboard Toshiba PHRAA ver. PSBY1U-00F003 Memory 4GB+4GB Samsung DDR3 PC3-10700 (1333 MHz) Graphics Card Video Intel(R) HD Graphics Family, 1696MB available memory Sound Card Realtek High Definition Audio version=6.0.1.6323 Monitor(s) Displays 17.3 " Trubrite TFT LCD, LED Backlit Screen Resolution 1600x900 32 bit, Native support for 720P content Keyboard Premium Raised Tile keyboard Mouse Logitech M215 wireless mouse PSU Toshiba AC/DC Adapter Case Notebook Cooling Built-in Fan Hard Drives TOSHIBA MK6476GSXN
580.614 [GB] partitioned C: 80GB and D: 500GB with hidden recovery partitons.
Spare bay for 2nd HDD but no SATA connector :-( Internet Speed Not fast enough Other Info Built-in Harman Kardon speakers with Dolby Advanced Audio, Waves MaxxAudio® 3. HDMI, 1xUSB3+3xUSB2 ports, WebCam, Battery life 4hrs 11mins, 4GB Readyboost SDHC card, WD My Book Essential Ext HDDs 2 TB, 2x1TB, My Passport SE 1TB and WDTV 1st Gen for Multimedia playing on a Sony Wega 32" LCD.
Recent addition to my toys are Asus Transformer Pad TF300T with 32GB onboard sd card + 32GB microsd card. |
19 Mar 2012
|
#4 | | Windows 7 home premium x64 |
They are deliberately different, one is a public accessible area with links to progrmans that anyone may use. Dad's are specifically for your profile, which if Admin also gives permissions over a normal account.
What puzzles me is why you cannot just open one and select all, then copy or move to the other. | My System Specs | | System Manufacturer/Model Number DIY OS Windows 7 home premium x64 CPU AMD FX-4100 AM3+ 3.6GHz 12MB Black Edition Motherboard Asus M5A97 Pro Memory Crsair vengeance 12Gb DDR3 1600MHz CL9 Graphics Card Asus GTX 560 1GB Sound Card Realtek onboard Monitor(s) Displays Hanns G 1680x1050 native PSU OCZ StealthXstream II 500W Hard Drives OCZ 128Gb Petrol ssd
2x500 Gb Samsung Internet Speed 8Mb or better |
19 Mar 2012
|
#5 | | Windows 7 Home Premium 64bit |

Quote: Originally Posted by bbearren I'm not quite sure what your goal is here.
Do you have duplicate icons on C:\Users\Dad\Desktop? No duplicate icons.
When installing programs, if the installation process creates the desktop link the link usually ends up in the "Public desktop" folder:
..... Apple Orange Zucchini
When I create desktop links to programs myself, they end up in Dad's desktop folder.
..... Carrot Grape Tomato
Example of how the icons appear on Windows 7's desktop:
..... Apple Orange Zucchini Carrot Grape Tomato
How I want them to appear on the desktop:
..... Apple Carrot Grape Orange Tomato Zucchini | My System Specs | | OS Windows 7 Home Premium 64bit |
19 Mar 2012
|
#6 | | Windows 7 Home Premium 64bit |

Quote: Originally Posted by rraod Try this batchfile.
rem @echo off
move C:\Users\Public\Desktop\*.* C:\Users\Dad\Desktop That path won't work.
Windows 7's public desktop icons are stored in this path:
C:\Users\Public\Public Desktop. | My System Specs | | OS Windows 7 Home Premium 64bit |
19 Mar 2012
|
#7 | | Windows 7 Home Premium 64bit |

Quote: Originally Posted by cyclic They are deliberately different, one is a public accessible area with links to progrmans that anyone may use. Dad's are specifically for your profile, which if Admin also gives permissions over a normal account.
What puzzles me is why you cannot just open one and select all, then copy or move to the other. Yes, I can manually copy the icons using Windows 7's drag and drop as you pointed out. But that takes multiple steps. I want to just create a batch file and desktop shortcut that will do it all with a single click. Then I will be able to sort all of my desktop icons for the next 8 years of using Win 7 with single clicks.
I did this when I was running Windows XP and it worked fine (though the paths were different). I just can't get it to work running Win 7.
My theory is what I learned when taking a programming class many years ago:
"Don't make the human do what the computer can do better and faster." | My System Specs | | OS Windows 7 Home Premium 64bit |
19 Mar 2012
|
#8 | | Win 7 Pro x64 SP1, Win 7 Ult x86 SP1 NC, USA |
Quote: That path won't work.
Windows 7's public desktop icons are stored in this path:
C:\Users\Public\Public Desktop. Did you try using "C:\Users\Public\Desktop" for the path?
In my screen print you can see "C:\Users\Public\Public Desktop" gets an error.
cd = change directory.
You can also add a "pause" command at the end of your BAT file to keep the bat CMD window open.
This can be helpful for troubleshooting so you can see any messages.
If there are permission errors, you may need to run the bat file with "Run as administrator".
Each of those folders should have a hidden "desktop.ini" file.
I'm not sure if that will cause a problem, but you may have to deal with that... | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number home built OS Win 7 Pro x64 SP1, Win 7 Ult x86 SP1 CPU AMD Athlon II x4 620 Motherboard Gigabyte GA-MA785G-UD3H Memory 6GB GSkill DDR2 800 Graphics Card AMD 4670 GPU + AMD 4200 IGP Sound Card on board Realtek ALC889A Monitor(s) Displays RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor Screen Resolution 1680 x 1050... Keyboard Gyration wireless, Logitech wireless, Dell USB wired Mouse Gyration wireless, Logitech wireless, V7 USB wired PSU Corsair 500 W Case Rosewill mid tower Cooling CM 90mm Tower Hard Drives OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ... Internet Speed Uverse - 12Mbps D / 1.5Mbps U Antivirus Avast free OR MSE. (+ MBAM Pro). Browser 1-Firefox, 2-IE. (Chrome and Opera for testing) Other Info 2 PCs: Primary: dual-boot, Test: triple-boot.
Mainly HTPC/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.
Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.
Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner. |
19 Mar 2012
|
#9 | | Windows 7 Home Premium 64bit |

Quote: Originally Posted by rraod Try this batchfile.
rem @echo off
move C:\Users\Public\Desktop\*.* C:\Users\Dad\Desktop 
Quote: Originally Posted by DavidW7ncus Quote: That path won't work.
Windows 7's public desktop icons are stored in this path:
C:\Users\Public\Public Desktop. Did you try using "C:\Users\Public\Desktop" for the path?
In my screen print you can see "C:\Users\Public\Public Desktop" gets an error.
cd = change directory.
You can also add a "pause" command at the end of your BAT file to keep the bat CMD window open.
This can be helpful for troubleshooting so you can see any messages.
If there are permission errors, you may need to run the bat file with "Run as administrator".
Each of those folders should have a hidden "desktop.ini" file.
I'm not sure if that will cause a problem, but you may have to deal with that... Attachment 203515 rraod and DavidW7ncus,
To each of you, "You are the man!" (or woman)
Your suggestion to use the "C:\Users\Public\Desktop\*.*" for the path worked!
I would love to know why it works. When I use Windows 7's explorer, the public icons are stored in "C:\Users\Public\Public Desktop". There is no "Desktop" folder in the C:\Users\Public path.
Thanks!
Skyzoomer | My System Specs | | OS Windows 7 Home Premium 64bit |
19 Mar 2012
|
#10 | | MS Windows 7 Ultimate 64-bit SP1 Somewhere in the middle of Desert :-) |
The "Public Desktop" in "C:\Users\Public\Public Desktop" is not really a folder but an alias to the "Desktop" folder in C:\Users\Public which is "C:\Users\Public\Desktop.
In Batch programming the "Public Desktop" does not work but \Public\Desktop works.
I have given the above example only after checking that it works. Have you tried it? Try it once. | My System Specs | | System Manufacturer/Model Number Toshiba Satellite P775-S7232 OS MS Windows 7 Ultimate 64-bit SP1 CPU i5-2410M 2.3GHz (2.9GHz Turbo-Boost) Sandy Bridge 32nm Motherboard Toshiba PHRAA ver. PSBY1U-00F003 Memory 4GB+4GB Samsung DDR3 PC3-10700 (1333 MHz) Graphics Card Video Intel(R) HD Graphics Family, 1696MB available memory Sound Card Realtek High Definition Audio version=6.0.1.6323 Monitor(s) Displays 17.3 " Trubrite TFT LCD, LED Backlit Screen Resolution 1600x900 32 bit, Native support for 720P content Keyboard Premium Raised Tile keyboard Mouse Logitech M215 wireless mouse PSU Toshiba AC/DC Adapter Case Notebook Cooling Built-in Fan Hard Drives TOSHIBA MK6476GSXN
580.614 [GB] partitioned C: 80GB and D: 500GB with hidden recovery partitons.
Spare bay for 2nd HDD but no SATA connector :-( Internet Speed Not fast enough Other Info Built-in Harman Kardon speakers with Dolby Advanced Audio, Waves MaxxAudio® 3. HDMI, 1xUSB3+3xUSB2 ports, WebCam, Battery life 4hrs 11mins, 4GB Readyboost SDHC card, WD My Book Essential Ext HDDs 2 TB, 2x1TB, My Passport SE 1TB and WDTV 1st Gen for Multimedia playing on a Sony Wega 32" LCD.
Recent addition to my toys are Asus Transformer Pad TF300T with 32GB onboard sd card + 32GB microsd card. Batch file to move desktop icons so ALL are sorted. problems? All times are GMT -5. The time now is 06:55 AM. | |