ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

sike 1.0 - send file(s) to recycle bin via command line

<< < (2/7) > >>

excellent idea
-justice (June 11, 2010, 03:51 AM)
--- End quote ---

Thank you. :)

Hi MilesAhead,

FYI, it doesn't work if the filename has some uncommon characters, like: á - ô - ü

E.g.: "mçfilè.txt"

EDIT: if  use it in a .bat file doesn't work - if I use it in a command prompt no annoyances...
-majoMO (June 11, 2010, 07:02 AM)
--- End quote ---

Thanks for reporting that info.  On the special characters I believe that is because AutoIt3 itself is ansi. It doesn't support unicode afaik. The command line parsing is a built in feature where you are presented with an array of the command line args: $CmdLine where the first element is the count and the rest of the elements correspond to an arg.  I don't know if there's any easy way to correct it. I'll see if I can find a fix on AutoIt3 forum.

As for the batch file, what kind of error do you get?

Hmmmm, I don't seem to be having much luck with the unicode.  I found some posts on AutoIt3 forum and it seems there's confusion if the command prompt or run box support unicode or what the issue is. There doesn't seem to be a simple way to accommodate it that I can find at present.

If you are willing to try some test apps I can try a few things out.  To be honest though, unicode is new to me.  I've just done stuff for English language and ansi.

I compiled this test app with a unicode directive.  I'd like to see if it actually has any effect.  All it does is pop up a box with the command line arguments displayed.

TestCmdLine one two three

but with args that have unicode characters should test if this approach is feasible.

If run with no args it just pops up a MsgBox with Usage: msg.

The zip just contains the compiled AutoIt3 script(without any UPX compression)

(edit: actually the directive was to use UTF-8.)

As for the batch file, what kind of error do you get?-MilesAhead (June 11, 2010, 01:40 PM)
--- End quote ---

No error at all. It just doesn't copy to recycle bin only.

* TestCmdLine
Bat file with:TestCmdLine.exe sike.exe "mçfilè.txt":

Bat file with:TestCmdLine.exe sike.exe "my.txt":

* All-round
If I use a .bat file I need to use this to work well:

@echo off
for /f "tokens=2 delims=:" %%a in ('2^>nul chcp') do set cp=%%a
>nul 2>&1 chcp 1252
sike.exe "mçfilè.txt"
>nul 2>&1 chcp%cp%

If I use only «sike.exe "mçfilè.txt"» it doesn't work.

Hope this help.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version