![]() 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': Ran the job, and it did exactly as I expected. #Texpad change encoding upgrade#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.Ĭ:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe #Texpad change encoding code#So, I then created a PS1 file in the temp folder:ĭ:\VisualCronTemp\Convert.ps1 containing the 2 lines of code in blue above I was still able to read the CSV file in using powershell: $Content | out-file -filepath d:\VisualCronTemp\Output.csv -encoding Unicode $Content = get-content d:\VisualCronTemp\testExport.csv I then ran the following commands in powershell: I saved your testExport.txt file as d:\VisualCronTemp\testExport.csv csv extract and save it in unicode to prevent this before delivery to our client.Īs far as I can tell, my original suggestion should work. 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 file, so I just updated the file extension on my attachment from. We still have over 140 jobs running on 4.6 but are slowly migrating them to a new 2008 server running 6.1.4 after testing them all (new server is 2008 R2) version 4, was that not back when upgrades were for 'life'? I highly recommend upgrading to 6.x as the options just get better and better. That way it'll launch powershell and use the script referenced. Save a file named c:\path\to\script.ps1 (pick your path) and put the 2 lines of code I gave you before inside that file. You could use the execute task, but to use powershell you'd have to do it a little differently:Ĭommand: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe csv file in Notepad and then save it in Unicode and we'd like to do that automatically before a user accidentally opens the file in Excel and then corrupts it which ends up delivered to our client who is unhappy.Īny chance you could attach an example file that doesn't have any proprietary info in it?Īnd. If we open the report in Excel the product descriptions are corrupted so we need a way to open the. csv of product descriptions which can be in English, French, Chinese, etc. I have an application that creates an export file of type. vbs file and use the Execute Script but that didn't work either :(Īnd just to reconfirm what I'm trying to do. I did try to take your code and copy it to a. Thank you for the info, however we are on version 4 of VC so we don't have that task type. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |