简体   繁体   English

在R中为命令行工具运行system()调用

[英]run system() call in R for command line tool

I am trying to write a script in which I need to run a command line tool to parse the xml to csv file. 我正在尝试编写一个脚本,在该脚本中,我需要运行命令行工具以将xml解析为csv文件。 it works as this: 它是这样的:

XmlToCsv.Console.exe -xml file.xml -dir C:/Desktop. 

So I replicated this in R as 所以我在R中将其复制为

system('XmlToCsv.Console.exe -xml file.xml -dir C:/Desktop')

but it is not working. 但它不起作用。 Does anyone know what I did wrong? 有人知道我做错了吗?

Some possible issues: 一些可能的问题:

Is the location really C:/Desktop ? 该位置真的是C:/Desktop吗? If you have spaces in your path, then that path needs to be wrapped in quotes, and probably needs to already exist. 如果路径中有空格,则该路径需要用引号引起来,并且可能已经存在。 (I don't know if XmlToCsv.Console.exe will create it automatically if it doesn't.) (我不知道XmlToCsv.Console.exe是否会自动创建它。)

If you are using Windows then XmlToCsv.Console.exe should be contained in a folder listed in the PATH environment variable. 如果使用Windows,则XmlToCsv.Console.exe应该包含在PATH环境变量中列出的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于XML数字签名的命令行工具 - command line tool for XML digital signing 命令行工具从XML文件中提取键值对 - Command line tool to extract key value pairs from XML files 命令行工具,用于修改JetBrains项目中.idea文件夹中的XML - Command line tool to modify XML in .idea folder in JetBrains projects 无法在PHPStorm 10.0.1中为工匠制作命令行工具 - Cannot make command line tool for artisan in PHPStorm 10.0.1 单行xpath提取命令行工具 - one-liner xpath extraction command line tool Ant中的迭代,命令行xquery函数调用 - Iteration in Ant, command line xquery function call 将System.Xml.Linq与mono命令行编译器一起使用 - Using System.Xml.Linq with mono command line compilers 是否存在用于将XML文件转换为单个HTML文件的Linux命令行工具序列? - Is there a Linux command line tool sequence for converting XML files into a single HTML file? Linux 到 diff XML 文件的开源命令行工具忽略元素顺序 [关闭] - Open source command line tool for Linux to diff XML files ignoring element order [closed] 如何使用 Saxon java 库命令行工具执行 schematron 验证? - How to perform schematron validation using Saxon java library command line tool?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM