The forum won't allow me to attach a .csv file, so I just updated the file extension on my attachment from .csv to .txt. Our customer has a value of È within a description, if you open this file in Excel it changes it to ├ê so we need to be sure to take the .csv extract and save it in unicode to prevent this before delivery to our client.
As far as I can tell, my original suggestion should work. I saved your testExport.txt file as d:\VisualCronTemp\testExport.csv
I then ran the following commands in powershell:
$Content = get-content d:\VisualCronTemp\testExport.csv
$Content | out-file -filepath d:\VisualCronTemp\Output.csv -encoding UnicodeI was still able to read the CSV file in using powershell:
import-csv d:\VisualCronTemp\Output.csvSo, I then created a PS1 file in the temp folder:
D:\VisualCronTemp\Convert.ps1 containing the 2 lines of code in blue above
Using my VC server running version 4.6.17 (yeah, I should really upgrade it haha, but i'm moving everything slowly over to the new server running VC 6.1.4) I went ahead and created a job with 1 task, an Execute Task, which I did a screenshot of and that is attached.
Command:
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
D:\VisualCronTemp\Convert.ps1
Start In:
D:\VisualCronTemp\
Ran the job, and it did exactly as I expected. Hopefully this works for you.
Oh, and if you haven't yet installed powershell, do so, and you'll also need to make sure and set the executionpolicy to 'RemoteSigned':
Launch PowerShell
type this:
set-executionpolicy remotesigned
If prompted, select Yes.
Brian
bbusse attached the following image(s):