kylemorgans
asked on
login script to add desktop icons won't add folder
I have a login script on my w2k domain mapping network drives and it also calls a command that adds icons to the desktop.
i almost have it right but it will only add files and not a folder.
this is the command that runs
copy H:\desktopicons\folder\* "%USERPROFILE%\desktop"
it is working right except that it won't add a folder
Please help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i tried the xcopy command and that disn't seem to work
but i am working on making it create the folder but i might need a lil more help with that
thanksa
but i am working on making it create the folder but i might need a lil more help with that
thanksa
Have you tried the xcopy command with the /e switch?
xcopy H:\desktopicons\folder\* "%USERPROFILE%\desktop" /e
(This forces xcopy to copy the directory even if it's empty)
:o)
Bartender_1
xcopy H:\desktopicons\folder\* "%USERPROFILE%\desktop" /e
(This forces xcopy to copy the directory even if it's empty)
:o)
Bartender_1
ASKER
the /e switch works
do u know how to have the folder be deleted when the user logs off and then with they log back on to create the file again . the /e command asks them if they want to overwrite the file when they log back in and that isn't good for the users u know?
do u know how to have the folder be deleted when the user logs off and then with they log back on to create the file again . the /e command asks them if they want to overwrite the file when they log back in and that isn't good for the users u know?
You could use the /y switch to suppress the "do you want to overwrite" message, and automatically overwrites:
xcopy H:\desktopicons\folder\* "%USERPROFILE%\desktop" /e /y
You would need to create a log off script to delete the directory, if you don't wish to use the "/y" option.
:o)
Bartender_1
xcopy H:\desktopicons\folder\* "%USERPROFILE%\desktop" /e /y
You would need to create a log off script to delete the directory, if you don't wish to use the "/y" option.
:o)
Bartender_1
ASKER
perfect thanks man
Thanks for the points!
I'm glad I was able to be of assistance.
Cheers!
:o)
Bartender_1
I'm glad I was able to be of assistance.
Cheers!
:o)
Bartender_1
if not exist "c:\%userprofile%\desktop\
Hope this helps!
:o)
Bartender_1