caspermurphy Posted February 10, 2004 Share Posted February 10, 2004 Hi, I am trying to copy files from a shared drive on to a user's PC. The copy part works fine, but some people do not close out their windows like I state in the script. I want to force a close without saving any of the files. I am having problems with the winkill part. Any suggestions? Thank you in advance for any help. John Here is what I have: MsgBox, 4, , Make sure you have closed out any Excel worksheets before proceeding!!! \nClick YES to proceed or NO to exit. IfMsgBox, NO, Exit BlockInput, On IfWinExist, Microsoft Excel, worksheet 2004 94.xls, WinKill, microsoft excel, worksheet 2004 94.xls IfWinExist, Microsoft Excel, worksheet 2004 94.3.xls, WinKill, microsoft excel, worksheet 2004 94.3.xls FileDelete,%userprofile%\\desktop\\Worksheet 2004 94.3.xls FileDelete,%userprofile%\\desktop\\Worksheet 2004 94.xls FileDelete,%userprofile%\\desktop\\ia94.xls FileCopy, \\\\sdolco2\\UI - EAAS\\new folder\\Worksheet 2004 94.3.xls, %USERPROFILE%\\Desktop\\*.*, 0 FileCopy, \\\\sdolco2\\UI - EAAS\\new folder\\Worksheet 2004 94.xls, %USERPROFILE%\\Desktop\\*.*, 0 FileCopy, \\\\sdolco2\\UI - EAAS\\new folder\\92.44 form.xls, %USERPROFILE%\\Desktop\\*.*, 0 BlockInput, Off Link to comment Share on other sites More sharing options...
byteme Posted February 11, 2004 Share Posted February 11, 2004 try editing your two lines to this: ifwinexist, Microsoft Excel - Worksheet 2004 94.3.xls,, winkill, Microsoft Excel - Worksheet 2004 94.xls ifwinexist, Microsoft Excel - Worksheet 2004 94.3.xls,, winkill, Microsoft Excel - Worksheet 2004 94.3.xls hope this helps! Link to comment Share on other sites More sharing options...
caspermurphy Posted February 11, 2004 Author Share Posted February 11, 2004 Thank you that worked perfect Link to comment Share on other sites More sharing options...
Beastmaster Posted February 19, 2004 Share Posted February 19, 2004 Check this out, it could be used with AutoIt's Run(Wait) command ...PSFileIt's part of a complete set of tools offered as the: PSTools Suite, which is especially designed to work on LAN's. Link to comment Share on other sites More sharing options...
Recommended Posts