filter files ending in 'L'
filter files ending in 'L'
hello sir,
how to filter files ending in letter 'L' and send them to 'L' folder?
with regards,
kotlmg
how to filter files ending in letter 'L' and send them to 'L' folder?
with regards,
kotlmg
-
- Posts: 205
- Joined: 27 May 2014 05:24
Re: filter files ending in 'L'
Code: Select all
moveto("L", quicksearch(">(L)\.[^.]+$ /nc");
The \.[^.]+$ will match any extension.
/n switch the restrict search to exclude subfolders
/c switch will make it case-sensitive
Run this first to make sure you're selecting the correct files:
Code: Select all
text quicksearch(">(L)\.[^.]+$ /nc");
Re: filter files ending in 'L'
thanks for your script.
moveto("L", quicksearch(">(L)\.[^.]+$ /nc");
with above script, i am getting the error, the destination you have selected doen't exist. couldn't create new path. the file operation will not happen.
moveto("L", quicksearch(">(L)\.[^.]+$ /nc");
with above script, i am getting the error, the destination you have selected doen't exist. couldn't create new path. the file operation will not happen.
Re: filter files ending in 'L'
And in which directory are you, when you execute the command?
Btw, the command isn't syntactically correct. It's missing an ending
")" but even more so, it shouldn't use them at all. It's not a function,
it doesn't has a return value.
Btw, the command isn't syntactically correct. It's missing an ending
")" but even more so, it shouldn't use them at all. It's not a function,
it doesn't has a return value.
Code: Select all
moveto "L", quicksearch(">(L)\.[^.]+$ /nc");
One of my scripts helped you out? Please donate via Paypal
Re: filter files ending in 'L'
i am in folder D:\Partronics eboards Pvt.Ltd\IPIS\Wav Files\Digits - Copy\.
i am getting the error "the following items does not exist."
it is giving script error.
i am getting the error "the following items does not exist."
it is giving script error.
Re: filter files ending in 'L'
Screenshot of that error. If that folder really has write access it shouldn't fail to create a subfolder
One of my scripts helped you out? Please donate via Paypal
Re: filter files ending in 'L'
screenshots attached herewith.
- Attachments
-
- 2019-11-18_214922.png (19.46 KiB) Viewed 2069 times
-
- 2019-11-18_214901.png (45.29 KiB) Viewed 2069 times
Re: filter files ending in 'L'
Use the correct script call from viewtopic.php?p=174303#p174303
...
...
One of my scripts helped you out? Please donate via Paypal
Re: filter files ending in 'L'
Ok. Show the belonging screen shots of the error message you're getting after using
the command I posted above...
the command I posted above...
One of my scripts helped you out? Please donate via Paypal
Re: filter files ending in 'L'
error messages enclosed herewith.
- Attachments
-
- 2019-11-18_231513.png (49.1 KiB) Viewed 2059 times
-
- 2019-11-18_231504.png (26.23 KiB) Viewed 2059 times
Re: filter files ending in 'L'
Then either use this:
or update to at least v20.50.0201
moveto "L", replace(quicksearch(">(L)\.[^.]+$ /nc"), <crlf>, "|");
or update to at least v20.50.0201
One of my scripts helped you out? Please donate via Paypal
Re: filter files ending in 'L'
the above script worked perfectly.
thanks a lot.
thanks a lot.
Re: filter files ending in 'L'
moveto "L", replace(quicksearch(">(L)\.[^.]+$ /nc"), <crlf>, "|");
hello sir,
how to extend the above script to files ending in 'A'/'B'/'C'/..'Z'
A should go to A folder.
B should go to B folder.
..
Z should go to Z folder.
with regards,
kotlmg
hello sir,
how to extend the above script to files ending in 'A'/'B'/'C'/..'Z'
A should go to A folder.
B should go to B folder.
..
Z should go to Z folder.
with regards,
kotlmg
Re: filter files ending in 'L'
Not possible with a single line. Use a while loop and iterate over all chars from A-Z,
find the files that match that ending char with
find the files that match that ending char with
regexmatches
and execute themoveto
for these "blocks of files"One of my scripts helped you out? Please donate via Paypal