melblanc
02-10-2008, 11:11 PM
Hi. I'm trying to get a simple thing to work: get the working path, then remove that string from the path of an image file. But I can't get it to work right. This is my code
working = Folder.GetCurrent();
i_prop = Image.GetProperties("Image1");
i_folder = i_prop.ImageFile;
path = String.TrimLeft(i_folder, working);
The working folder is C:\Builds\My Project\CD_ROOT\
The image file path is C:\Builds\My Project\CD_ROOT\AutoPlay\Images\Image1.png
I expected to get "AutoPlay\Images\Image1.png" out of the TrimLeft action, but instead I get "Image1.png"...? What am I not understanding here? :huh
Thanks!!
working = Folder.GetCurrent();
i_prop = Image.GetProperties("Image1");
i_folder = i_prop.ImageFile;
path = String.TrimLeft(i_folder, working);
The working folder is C:\Builds\My Project\CD_ROOT\
The image file path is C:\Builds\My Project\CD_ROOT\AutoPlay\Images\Image1.png
I expected to get "AutoPlay\Images\Image1.png" out of the TrimLeft action, but instead I get "Image1.png"...? What am I not understanding here? :huh
Thanks!!