简体   繁体   中英

How to programmatically save files (.csv) from local machine running c# application to virtual machine

Hey guys so I have this one c# application which outputs these .csv's and I want it to send it to a virtual machine which has a python application that will pick up these files and do some data analysis on it. Is there any way to create a connection between the c# application and the virtual machine so that I can save the .csvs in the virtual machine directory for pickup by the python script.

As an option, you could create a Dropbox (or similar service) account, point your C# app to write the CSVs to this folder, and then access Dropbox from the VM for your Python app to pickup said CSVs.

You could also create a share on the VM, map it on the host (as long as you are on the same subnet, the VM has its own IP and is not bridged on the physical host's IP), have the C# app write the CSVs to this share, then point your Python app to parse the CSVs from the network share within the VM.

In Addition:

System.IO.File.Copy("sourcePath", "\\machinename\share folder path");

HTHs!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM