Path to macro in Windows PowerShell

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Path to macro in Windows PowerShell

Masatoshi Katabuchi
Hi,

I am having trouble with command line options in Windows. Windows PowerShell doesn’t recognize a path to a macro file correctly.

When I run the following command in the PowerShell,

pushd C:\\Program Files\\ImageJ
jre\\bin\\java -jar -Xmx2g ij.jar
-macro C:Users\\Administrator\\Desktop\\test.txt

The ImageJ returns the following error,
Macro or scrip not found:
C: \Program Files\ImageJ\macros\C:Users\Administrator\Desktop\test.txt

When a macro file is located at "C:Users\\Administrator\\Desktop\\test.txt”, how should I specify a path to the macro? 

Thank you,
Masatoshi

-- 
Masatoshi Katabuchi
Department of Biology
University of Florida
310 Carr Hall
Gainesville, FL 32611
email: [hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Path to macro in Windows PowerShell

Niko Ehrenfeuchter
Hi Masatoshi

On 01.12.2014 17:21, Masatoshi Katabuchi wrote:

> Hi,
>
> I am having trouble with command line options in Windows. Windows PowerShell doesn’t recognize a path to a macro file correctly.
>
> When I run the following command in the PowerShell,
>
> pushd C:\\Program Files\\ImageJ
> jre\\bin\\java -jar -Xmx2g ij.jar
> -macro C:Users\\Administrator\\Desktop\\test.txt
>
> The ImageJ returns the following error,
> Macro or scrip not found:
> C: \Program Files\ImageJ\macros\C:Users\Administrator\Desktop\test.txt
>
> When a macro file is located at "C:Users\\Administrator\\Desktop\\test.txt”, how should I specify a path to the macro?

you are missing the backslashes after "C:"

Cheers
Niko

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Path to macro in Windows PowerShell

Masatoshi Katabuchi
Hi Niko,

It works! Thank you very much.

-- 
Masatoshi Katabuchi
Department of Biology
University of Florida
310 Carr Hall
Gainesville, FL 32611
email: [hidden email]

On December 1, 2014 at 11:52:55 AM, Niko Ehrenfeuchter ([hidden email]) wrote:

Hi Masatoshi  

On 01.12.2014 17:21, Masatoshi Katabuchi wrote:  

> Hi,  
>  
> I am having trouble with command line options in Windows. Windows PowerShell doesn’t recognize a path to a macro file correctly.  
>  
> When I run the following command in the PowerShell,  
>  
> pushd C:\\Program Files\\ImageJ  
> jre\\bin\\java -jar -Xmx2g ij.jar  
> -macro C:Users\\Administrator\\Desktop\\test.txt  
>  
> The ImageJ returns the following error,  
> Macro or scrip not found:  
> C: \Program Files\ImageJ\macros\C:Users\Administrator\Desktop\test.txt  
>  
> When a macro file is located at "C:Users\\Administrator\\Desktop\\test.txt”, how should I specify a path to the macro?  

you are missing the backslashes after "C:"  

Cheers  
Niko  

--  
ImageJ mailing list: http://imagej.nih.gov/ij/list.html 

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html