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)?
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
mfilefrom = ALLTRIM(lcbuffer)
mcallnum1 = "C:\kernel\"
mfilenameandloc = mcallnum1 + ALLTRIM(SUBSTR(mfilefrom,RAT("\",mfilefrom) + 1,50))
? " "
? mfilefrom
? FILE(mfilefrom)
? SUBSTR(mfilefrom,RAT("\",mfilefrom) + 1,50)
? mfilenameandloc
mruncode = "COPY FILE " + mfilefrom + " TO " + mfilenameandloc
? mruncode
&mruncode
ELSE
ENDIF
ENDFOR
~M
>It sounds like you got CHR(0) at the end of the file name. I run my code again and I don't see any extra characters at the file names. Did you modify code in any way that could cause the problem?
>
>>thanks, am most of the way there, hopefully you can clear something up for me. I've used your code and gotten the list of files on the clipboard and have the file name, but there are spaces at the end of the name that i cannot get rid of and it is causing my copy file to fail. code is here. I get the file name and it is in a variable but no matter what way i trim it it is always "C:\KERNEL\FILE1.bmp ". the spaces at the end are causing the problem I think but I can't remove them, any ideas?
>>~M
>>
>>>Check
http://www.berezniker.com/search/apachesolr_search/clipboard
Go raibh maith agat
~M