开发者

create variable paramteter for batch file in a forfiles?

开发者 https://www.devze.com 2023-03-13 18:13 出处:网络
I want to execute the load.cmd file with the name of a file I have stored as a parameter. I can\'t seem to get this to work. It appears that the directories are all, correct (if I remove the call load

I want to execute the load.cmd file with the name of a file I have stored as a parameter. I can't seem to get this to work. It appears that the directories are all, correct (if I remove the call load.cmd it will at least display the list of items in the folder) but the error that returns says that it can't find/recognize load.cmd as a valid file.

forfiles /p MappingFiles /C "cmd call load.cmd --graph data:@fname @path"

Is this a synt开发者_如何学编程ax error? or is this something that forfiles wasn't designed to do?


Try something like:

forfiles /p MappingFiles /C "cmd call /c PATH\TO\load.cmd --graph data:@fname @path"

Replace PATH\TO with the actual full path to load.cmd.

0

精彩评论

暂无评论...
验证码 换一张
取 消