new button for quick search

Features wanted...
highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: new button for quick search

Post by highend »

it gives the parent path of selected folders
And?

If you need to distinguish between files and folders, use a foreach loop...
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

I just need to get full path of selected folders

Image

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: new button for quick search

Post by highend »

Mh?

What exactly should the script show with these two folders selected?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

show the folder name and its Absolute path not the parent folder
sorry for any confusion

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: new button for quick search

Post by highend »

In other words, this:

Code: Select all

gravity C:\games\gravity
space C:\games\space
?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

yes

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: new button for quick search

Post by highend »

Code: Select all

text regexreplace(<get "SelectedItemsPathNames" <crlf>>, "(^.*)\\(.*)", "$2 $1\$2");
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

how wonderful you are.thank you very much.

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

I hesitated before asking this but it is the last question in the topic

why adding text after $1\$2 makes the output in one line ?

Code: Select all

 $folder = regexreplace(<get "SelectedItemsPathNames" <crlf>>, "(^.*)\\(.*)", "net share ""$2""=""$1\$2"" /GRANT:""%username%"",FULL");
 echo $folder;
 $batFile = "%TEMP%\~share.txt";
 writefile($batFile, $folder);
Image
Image

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: new button for quick search

Post by highend »

In this case the regex pattern is too greedy, use this one instead:

Code: Select all

(^.*)\\(.*?)(?=\r?\n|$)
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1123
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: new button for quick search

Post by yusef88 »

grateful for your help

Post Reply