Hi All,
I am trying run a gpt script in Powershell for multiple images
When I run the following, it executes correctly
gpt C:/Users/Ishack/Desktop/test2/s1_cal_deb.xml -t C:/Users/Ishack/Desktop/test2/S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.dim C:/Users/Ishack/Desktop/test2/S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.zip
However when I run the batch script with exactly the same command like this:
PS C:\Users\Ishack\Desktop\test2> ForEach ($file in (Get-Content "C:\Users\Ishack\Desktop\test2\india.txt")) {
>>
>> gpt $file
>>
>> }
I get the following error:
Error: C:\Users\Ishack\Desktop\test2\s1_cal_deb.xml -t C:\Users\Ishack\Desktop\test2\S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.dim C:\Users\Ishack\Desktop\test2\S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.zip (The filename, directory name, or volume label syntax is incorrect)
The contents of india.txt:
C:/Users/Ishack/Desktop/test2/s1_cal_deb.xml -t C:/Users/Ishack/Desktop/test2/S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.dim C:/Users/Ishack/Desktop/test2/S1A_IW_SLC__1SDV_20190224T003144_20190224T003211_026064_02E80B_0ECE.zip
Any Ideas?
Thanks,
Ishack