My batch files keep creating a duplicate icon when they are ran. Instead of replacing the existing icon it just adds another one to my desktop. How can I fix this? Here is what one of my files look like:
ECHO OFF
@echo "Waiting for Position Matrix to shut down"
c:
cd\
mkdir databases
C:
cd\databases
del Inventory_mgr.mdb
o:
CD\WWP Shared\Databases
ECHO ON
echo "PLEASE WAIT WHILE FILES ARE BEING COPIED!!!"
echo "This box will close upon completion!!!!"
ECHO OFF
copy Inventory_mgr.mdb C:\databases
copy FREE3OF9.ttf c:\databases
CD\WWP Shared\Databases\icons
Copy Inventory_mgr.ico c:\databases
CD\WWP Shared\Databases\shortcuts
copy Inventory_mgr.lnk c:\databases
rem *******************************************
rem Window 7 fix
c:
cd\
cd databases
copy Inventory_mgr.lnk %userprofile%\Desktop
rem *****************************************
rem windows xp
c:
cd \
cd documents and settings
cd all users
cd desktop
copy c:\databases\Inventory_mgr.lnk
C:\databases\Inventory_mgr.mdb
rem ************************************************
I have also posted this same request at http://forums.windowsforum.org/index.php?showtopic=51332
ECHO OFF
@echo "Waiting for Position Matrix to shut down"
c:
cd\
mkdir databases
C:
cd\databases
del Inventory_mgr.mdb
o:
CD\WWP Shared\Databases
ECHO ON
echo "PLEASE WAIT WHILE FILES ARE BEING COPIED!!!"
echo "This box will close upon completion!!!!"
ECHO OFF
copy Inventory_mgr.mdb C:\databases
copy FREE3OF9.ttf c:\databases
CD\WWP Shared\Databases\icons
Copy Inventory_mgr.ico c:\databases
CD\WWP Shared\Databases\shortcuts
copy Inventory_mgr.lnk c:\databases
rem *******************************************
rem Window 7 fix
c:
cd\
cd databases
copy Inventory_mgr.lnk %userprofile%\Desktop
rem *****************************************
rem windows xp
c:
cd \
cd documents and settings
cd all users
cd desktop
copy c:\databases\Inventory_mgr.lnk
C:\databases\Inventory_mgr.mdb
rem ************************************************
I have also posted this same request at http://forums.windowsforum.org/index.php?showtopic=51332
Last edited:
My Computer
- Computer type
- PC/Desktop
- OS
- Windows 7 64bit