Posts: 1,271
Threads: 399
Joined: Mar 2003
do you have a better idea how to split filepath from _command ?
(drop file on exe or shortcut)
problem is that a filename can also have spaces, so using space
as a delimiter is not really helpful.
ARRAY(str) arr
int j nt
nt = tok(_command arr -1 " ")
for(j 0 nt) out arr[j]
thanks
Posts: 12,072
Threads: 140
Joined: Dec 2002
Posts: 1,271
Threads: 399
Joined: Mar 2003
the shortcut commandline:
"C:\Programme\Quick Macros 2\qmcl.exe" M "filecoast_upload" C
when drop more than 1 file tok is nessesary, because i want to make
only one upload a time.
for example:
E:\something to upload\test5785.zip E:\something to upload\test 1.zip
Posts: 12,072
Threads: 140
Joined: Dec 2002
Are they without quotes? I receive with quotes.
;out _command
str s="''C:\Documents and Settings\G\Desktop\winamp.txt'' ''C:\Documents and Settings\G\Desktop\todo.txt''"
ARRAY(str) a
tok s a -1 "'' " 4
int i
for i 0 a.len
,out a[i]
,
Posts: 1,271
Threads: 399
Joined: Mar 2003
Gintaras Wrote:Are they without quotes? I receive with quotes.
i removed the quotes while posting.
it has quotes when a space is in the filename, but not when there is no space.
E:\upload\test1.zip E:\upload\test5785.zip
"E:\something to upload\test5785.zip" "E:\something to upload\test 1.zip"
Posts: 12,072
Threads: 140
Joined: Dec 2002
The example will work. When you specify flag 4 and include ", delimiters within "" are ignored.
Posts: 1,271
Threads: 399
Joined: Mar 2003
yep, works.
thanks again.