Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

enemene

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

Sorry for reviving this old post.
I was having exactly the same issue and also tried
"option exclude */" ^


Then I found this post, unfortunately there was no progress for fixing this bug in years.
As a workaround I could just create another parent folder which is more a quick and dirty solution for my purpose.

I also tried the following code, but it doesn't seem to differentiate between files and folders on Linux systems. The script then tries to copy the folder "Backup" into itself.
"mv /export/*.* /export/Backup/" ^
tava

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

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

This is not supported yet.
Request is tracked here:
https://winscp.net/tracker/704
tava

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