Problems with CopyFile, DeleteFile and ExecFile

Blitz3D Forums/Blitz3D Beginners Area/Problems with CopyFile, DeleteFile and ExecFile

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You want to delete the file that is dragged onto your app?

I had a bit of trouble with it, it would appear to be related to long filenames

you need to remove the quotes from either side of the filename (don't ask me why)

this works:
file$=CommandLine$() 
;REMOVE THE QUOTES
file$= Left(file$,Len(file$)-1)
file$ = Right(file$, Len(file$)-1)

If FileType(file$) = 1 Then DeleteFile ""+file$
If FileType(file$) = 1 Then Print "not deleted" Else Print "deleted"
Print FileType(file$)
Print file$

WaitKey()
End