| View previous topic :: View next topic |
| Author |
Message |
icefreez
Joined: 15 May 2007 Posts: 169
|
Posted: Tue Oct 21, 2008 4:44 pm Post subject: Strip File Name From Path |
|
|
I have a path of say C:\folder\folder\folder\filename.exe and I would like to strip off the filename to get the path to the file only.
Is there any simple way to do this with out parsing for "\" and taking off the last parsed variable? |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1271
|
Posted: Tue Oct 21, 2008 4:52 pm Post subject: |
|
|
Use SplitPath. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
icefreez
Joined: 15 May 2007 Posts: 169
|
Posted: Tue Oct 21, 2008 6:13 pm Post subject: |
|
|
Ok thanks. I got that part working now but I can't seem to get what I would like to happen to happen properly.
What I am trying to do is launch Adobe Bridge and pass it a folder to begin at.
This is what I have so far.
| Code: | SplitPath, inputpath ,, dirout
dirout =%dirout%\
msgbox, %dirout%
Run, "C:\Program Files\Adobe\Adobe Bridge CS3\Bridge.exe" %dirout% |
According to this tutorial of how to add an open with option for bridge on folders I should have to just send it the format of
| Quote: | | "C:\Program Files\Adobe\Adobe Bridge\Bridge.exe" "%1" |
Now I have the correct path for my computer to bridge, and I am passing it the directory with %dirout%, but it just doesn't seem to want to work. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1271
|
Posted: Tue Oct 21, 2008 7:58 pm Post subject: |
|
|
Does dir_out contain spaces? Try putting it in quotes:
| Code: | | Run, "C:\Program Files\Adobe\Adobe Bridge CS3\Bridge.exe" "%dirout%" |
_________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
icefreez
Joined: 15 May 2007 Posts: 169
|
Posted: Tue Oct 21, 2008 8:14 pm Post subject: |
|
|
That did it. Thanks for your help!
I also had to remove the added "\" I had put on to the path.
Final Code that worked
| Code: | SplitPath, Val_ToRun ,, dirout
Run, "C:\Program Files\Adobe\Adobe Bridge CS3\Bridge.exe" "%dirout%" |
|
|
| Back to top |
|
 |
jimm1909
Joined: 30 Sep 2010 Posts: 1
|
Posted: Thu Sep 30, 2010 6:56 pm Post subject: |
|
|
Awesome thanks for the response I was having the same problem. Easy fix!
-Jim |
|
| Back to top |
|
 |
|