Difference between command line and button.
Moderators: white, Hacker, petermad, Stefan2
Difference between command line and button.
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? :/
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? :/
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).
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).
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)
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)
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
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.
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
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.
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
-
- Senior Member
- Posts: 228
- Joined: 2006-02-04, 13:02 UTC
Just open you windows Help (Start->Help and Support) and search for 'cmd'.Zief wrote:theosdikaios you are genius! It works very well, can You just explain what /c parameter is for? I see that without it, it doesnt work, just curious.
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
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams