Difference between command line and button.

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Zief
Junior Member
Junior Member
Posts: 5
Joined: 2006-06-13, 16:20 UTC

Difference between command line and button.

Post by *Zief »

Hi!

Im trying to launch fsum using button in TC. However, i dont know why but i launches as i want only from command line in TC, not bar.

I use it with such a command: fsum.exe -r -jm *.* >[%DATE%].md5

-r means recursive
-jm is a type of produced file
>outpoutfile.ext defines output file, it is also possible to use full paths like >C:\Test\Checksums.txt

And now the problem, when i type "fsum.exe -r -jm *.* >[%DATE%].md5" in cmd file is created in current directory. The same command typed in button doesnt output file at all :/

Tried with %P but also no succes, any suggestions? :/
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

Post by *D1P »

First, you must type all command parameters (-r -jm *.* >[%DATE%].md5) in "Parameters" section in button change dialog, not in "Command" field.
Second, try to use "%P%N" (with commas) to specify single file under cursor. May be "%P"*.* will work also, i don't know.
You also can try to use "%L" parameter. It specify filelist as parameter (file, which contains all filenames from active panel).
Zief
Junior Member
Junior Member
Posts: 5
Joined: 2006-06-13, 16:20 UTC

Post by *Zief »

Tried with specifying parameters in "Parameters" earlier but the results look the same. Fsum acts like there wouldnt be nothing after *.* (ignores ">outputfile"). Tried to put in parameters "-r -jm -d"%P" *.* >"%P"test.md5" but also no success, it seems even worse as program closes as soon as it starts. (-dPATH specifies directory to scan, if not specified program starts in current).

Its strange as it work as I said from cmd line in TC (the one above move, copy etc buttons).

BTW *.* specifies only filenames to scan, so I would prefer to scan everything recurively (-r *.* in working directory)
User avatar
Hacker
Moderator
Moderator
Posts: 13068
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

1. I don't think that redirection using > works when run from a button / Start menu entry.
2. % must be written as %%.

Perhaps you could try and create a .bat file that would run your program, and start this .bat file from the Button bar.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Zief
Junior Member
Junior Member
Posts: 5
Joined: 2006-06-13, 16:20 UTC

Post by *Zief »

1. It looks like, is it possible to obey this somehow? Too lazy to meke bat ;]
2. But % was used before P so the real parameter was %P not %%, or maybe i I dont get sth? :]
User avatar
Hacker
Moderator
Moderator
Posts: 13068
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

1. I don't think so.
2. %P is an internal parameter. If you want to use % for other uses than internal parameters, you have to use %%. See the Help for the Button bar.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Zief
Junior Member
Junior Member
Posts: 5
Joined: 2006-06-13, 16:20 UTC

Post by *Zief »

I know its internal, thats why I used it. Is there need to format somehow there parameters? Can they be surrounded by other not internal? I mean if sth like word%Pword is correct?
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

Why to ask? Just try.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

Post by *theosdikaios »

How about this:
command: cmd /c fsum.exe -r -jm *.* >[%DATE%].md5
parameters: <empty>
Zief
Junior Member
Junior Member
Posts: 5
Joined: 2006-06-13, 16:20 UTC

Post by *Zief »

theosdikaios you are genius! :D It works very well, can You just explain what /c parameter is for? I see that without it, it doesnt work, just curious.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Zief wrote:theosdikaios you are genius! :D It works very well, can You just explain what /c parameter is for? I see that without it, it doesnt work, just curious.
Just open you windows Help (Start->Help and Support) and search for 'cmd'.

There you'll find explanation for all command line parameters of cmd, not only '/c'.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply