Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Convert Windows Path to R-Compatible Path

Description
This macro will convert a Windows Path (with backslashes) to an R-Compatible Path (with forward slashes).
Language
C#.net
Minimum Version
Created By
Stephan L.
Contributors
-
Date Created
Aug 7, 2018
Date Last Modified
Aug 7, 2018

Macro Code

using System;
using System.Text;
using System.Collections.Generic;

public static class ClipboardFusionHelper
{
     public static string ProcessText(string text)
     {
           //copy whatever is selected to the clipboard
           //this will allow this macro to be used more quickly
           text = BFS.Clipboard.CopyText();               

           if (text.Contains("\\"))
           {
                return text = text.Replace("\\", "/");
           }

           //paste the StringBuilder
           BFS.Clipboard.PasteText(text);    

           return text;
     }

}