Issue passing variables to batch file from start menu entry.

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
cpaetz
New Member
New Member
Posts: 1
Joined: 2011-12-16, 18:34 UTC

Issue passing variables to batch file from start menu entry.

Post by *cpaetz »

I did a quick Search but couldn't find anything on this issue. I'm setting up some batch files to automate some common admin tasks from the start menu in TC but while I'm testing I'm finding that passing the %t variable as a parameter to the batch file is not always working as expected. It seems to at random pass the source path instead... with some of these batch files this could be disastrous....

One of the Start Menu Items I set up is configured like this

Title: Take Ownership Recursively (Target Directory)
Command: %COMMANDER_PATH%\Tools\take ownership recursively.bat
Parameters: %t

The contents of the batch file is

icacls %1* /reset /t > C:\icalcs.log
C:\icalcs.log

Am I doing something wrong? or is this a known issue?

Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50937
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, I'm not aware of this problem. How about using %T (uppercase) instead? You should probably put it in double quotes "%T". The lowercase one passes the DOS name to the program.
Author of Total Commander
https://www.ghisler.com
Post Reply