LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I execute rcmd with parameters in CVI

I am currently developing an ap for production use, first I will scan a barcode then the barcode will be stored in a txt file in one of the directory on c:\ say c:\barcode\barcode.txt. This works fine and no problem.

the next step is get this barcode.txt and store it into an external USB disk without a drive letter being assigned by windows. Say when this disk is connected to the PC it will just appear as "Device", no drive letter assigned (dont need to). But in order to write it to disk we make use of rcmd (activesync is installed), with a parameter, So I will create a batch file with the content (say filename is get.bat)
rcmd copy "c:\\barcode\\barcode.txt" "Device"

so, CVI will call get.bat then this will do the rest. copy the txt file to the device. but I cannot get it to work to write into the device.


________________________________________________________________
Electronics Manufacturing Tester Forum
0 Kudos
Message 1 of 2
(3,050 Views)
This is only a blind shot, since I don't have a PocketPC pda and activesync and so...
 
I personally would check if those double-backslashes are necessary in your batch file: since this line is to be interpreted by rcmd and not by a C program is possible that doubling the backslashes causes the command to fail. Similarly I would check if those double quotes are necessary for the command to succeed: under Windows environment double quotes are needed only if the file/directoryname has embedded spaces (e.g. "C:\National Instruments") and is not required if (like in your case) there aren't.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,038 Views)