Command-linewith inclusion and exclusion mask

Advertisement

jtallent
Guest

Command-linewith inclusion and exclusion mask

Hi!
I'm trying to issue the following command (assume I'm already connected):

mv ??????-??.TXT|0911??-??.TXT archive/

the command waits a few seconds then returns to the prompt but does nothing. Basically what I'm trying to do is move all files having the above pattern EXCEPT for those files starting with 0911. The files are named YYMMDD-EC.TXT and YYMMDD-CC.TXT where YYMMDD is a date. The documentation says that I can specify an exclude mask by appending it to the include mask. Doing so does not seem to do anything. A better explanation (or better yet a real example on the documentation page) would be ideal. Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Command-linewith inclusion and exclusion mask

It is actually not possible to combine masks this way in this context. I'll update the documentation.

Reply with quote

Pedrodude
Guest

Re: Command-linewith inclusion and exclusion mask

martin wrote:

It is actually not possible to combine masks this way in this context. I'll update the documentation.

The filemask switch is really useful and it would be great if this could be implemented into the move command for just this sort of situation. My need is very similar: I'd like to be able to archive all files in a folder to a subfolder and I'm obviously getting the error code 2 as this bit of my script:
mv *.* Processed/
tries to copy the "Processed" folder into itself...

Unless there's a clever workaround I've missed!

Otherwise, as this is my first post, thank you so much for your excellent application!

Regards,

P

Reply with quote

martin
Site Admin
martin avatar

Re: Command-linewith inclusion and exclusion mask

Pedrodude wrote:

Unless there's a clever workaround I've missed!
Note the files to subfolder in temp folder and than move the whole folder to the original folder.

Reply with quote

pedrodude
Guest

Re: Command-linewith inclusion and exclusion mask

martin wrote:

Pedrodude wrote:

Unless there's a clever workaround I've missed!
Note the files to subfolder in temp folder and than move the whole folder to the original folder.

Thanks, I suppose that would work. But it does seem like something that a filemask in mv would solve more neatly (I can see situations where one might not have "create new folder" permissions on the remote location). Is this something likely to appear in a future version?

Regards

Reply with quote

Advertisement

You can post new topics in this forum