del /q "%USERPROFILE%\My Documents\backup\%curr_date%_backup\*.lnk"
In the first line I am creating a folder with current date, e.g. curr_date_backup. Second, copying the contents of Desktop to the newly created folder. Third, deleting directories from the desktop. Forth, deleting files from the desktop. fifth, Copy back all the shortcuts to the desktop. sixth, deleting all the shortcuts from Current date folder.
This batch file is working perfectly in Windows XP. It works in win 7 also but the problem is that the name of the current date folder created by first command is "Desktop". when I use command prompt to check the name, the name is correct. I checked the properties of the folder the correct is there also. But in windows the name doesn't match with the expected one.
I need help. Kindly tell me what's going on? why window 7 is showing directory name as "Desktop"? Is there any other way for creating folder in Windows 7 using batch file.
System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050
Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download
No, I won't run 1.bat, sorry. You said "It works in win 7 also but the problem is that the name of the current date folder created by first command is "Desktop". I took the first two lines and put them in a batch file and they work correctly. They did not create a Desktop folder.
What happens if you run just the first two lines? Does it work correctly?
System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050
Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download
System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050
Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download
I think the problem might be you have a hidden desktop.ini file in your Desktop folder.
If I'm right, then this file gets copied along with everything else into your backup folder, and when looking at the backup folder with Explorer, the desktop.ini file (its backup, that is) instructs Explorer to show the backup folder as "Desktop".
See if a desktop.ini file is present in your backup folder. If yes, delete it. Does this change Explorer's behavior?
If yes, you've found the problem. From there, all you need to do is modify the xcopy commandline arguments to exclude "desktop.ini" from being copied and you're all set.
System Manufacturer/Model Number Custom-built OS Windows 7 Professional SP1 32-bit CPU Intel Core 2 Duo E6600 2.4GHz, overclocked to 2.7GHz Motherboard Asus PL5D2 Memory 4GB DDR2-667 (4x1GB in dual-channel config) Graphics Card nVidia GeForce 9800 GT Sound Card Creative X-Fi XtremeMusic Monitor(s) Displays Acer Screen Resolution 1920x1200 (DVI)
Keyboard Standard Mouse Microsoft wireless optical mouse PSU Antec TruePower 2.0 Case Cooler Master Centurion Cooling various fans Hard Drives OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache Internet Speed DSL; ~330KB/sec down, ~110KB/sec up Other Info Have a laptop too :) (Compaq CQ60 also with Win7 Pro SP1 32-bit)
Drives in both systems:
C: - Windows 7 + apps. Pagefile is fixed size and located at the very end of the partition.
D: - various temp files/cache for Firefox and apps/games.
E: - videos, music, misc. storage, torrent downloads, etc.