Move everything in a directory but exclude sub-directories

Advertisement

tava
Joined:
Posts:
2

Move everything in a directory but exclude sub-directories

Hi,

I've read the scripting section & forums for this issue but can't seem to find it regarding MOVE command. If it has been said already really sorry.

I have a default folder called "HOME" and inside HOME sits bunch of files (e.g. 1.txt, 2.csv, 3.xls, 4.pdf ...etc) Also in the HOME Folder sits a subdirectory called "HOLDING".

Part of my command I use the Syntax "mv *.* /HOME/HOLDING/" this starts to move all files (1.txt,2.csv etc) into HOLDING however, it then starts to move HOLDING into its own folder and fails with with a permission Error "Cant Move Holding into Holding" which makes perfect sense.

How do i exclude "HOLDING" from being moved as well. I've tried

- Option exclude "*/" -Doesn't work
- Option exclude "/HOLDING/" (as well as "/HOLDING" , "*/HOME/HOLDING")

Any ideas I'm also using WINSCP 4.3.5 (Build 1463) - not sure if this makes a difference but ideally i dont wish to update if not required)

Thanks

Tava

Edit: Spelling Errors

Reply with quote

tava
Joined:
Posts:
2

Re: Move everything in a directory but exclude sub-directories

martin wrote:

This is not supported yet.
Request is tracked here:
https://winscp.net/tracker/show_bug.cgi?id=704


Thanks for the quick reply, this issue was originally logged in 2011 by another user, since it hasn't been fixed are you looking at a quick resolution.

Work around I'm using at the moment is MV command with list of file types we expect to get sent to us & common extensions.

Thanks again,
Tava

Reply with quote

Advertisement

You can post new topics in this forum