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
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