mfilefrom = LEFT(lcBuffer, lnLen)
>this is the only part of the code where i made changes. a couple or superfelous now as i was testing different things. i originally had the copy file to command on its own but put it into the variable in case that made a difference. how would i remove chr(0)?> * Get each file name > FOR lnFile = 0 TO lnFileCount-1 > lnLen = DragQueryFile(lnHdrop, lnFile, @lcBuffer, lnSize ) > ? lnFile+1, LEFT(lcBuffer, lnLen) > > IF MESSAGEBOX("Do you want to save file " + lcbuffer + "?",36,"Save File") = 6 > * yes > > mfilefrom = ALLTRIM(lcbuffer) > mcallnum1 = "C:\kernel\" &&SYS(5) + CURDIR() + "a\" > *SUBSTR(lcBuffer,RAT("\",lcBuffer) + 1,50) > > mfilenameandloc = mcallnum1 + ALLTRIM(SUBSTR(mfilefrom,RAT("\",mfilefrom) + 1,50)) > *mfilenameandloc = "c:\kernel\" > ? " " > ? mfilefrom > ? FILE(mfilefrom) > ? SUBSTR(mfilefrom,RAT("\",mfilefrom) + 1,50) > ? mfilenameandloc > mruncode = "COPY FILE " + mfilefrom + " TO " + mfilenameandloc > ? mruncode > &mruncode > ELSE > * no > ENDIF > ENDFOR >>~M