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

martin

Re: Copy/compare folder

There's no magic way to implement such special task.

You have to write a script that identifies the folders you are looking for.

It is easy e.g. with PowerShell and WinSCP .NET assembly.
https://winscp.net/eng/docs/library_powershell

Use:
- Session.ListDirectory to enumerate all folders
- Session.FileExists to check an existence of the - 02 - subfolder
- Session.GetFiles to download them

https://winscp.net/eng/docs/library_session_listdirectory
https://winscp.net/eng/docs/library_session_fileexists
https://winscp.net/eng/docs/library_session_getfiles
Guest

Re: Copy/compare folder

martin wrote:

Prince wrote:

I need to create a script for compare/copy only folder with subfolder "- 02 -"
Final result will be:

c:\example\richard\- 02 -
c:\example\stephan\- 02 -

The other folder name must be exclude

That's sound ambiguous to me.

Do you want to
- copy only folder with subfolder "- 02 -"
- or copy only the subfolder "- 02 -"

Or are these the same, i.e. is there always only one subfolder?


Need to copy folder (and file into it) with subfolder (and file into it)
martin

Re: Copy/compare folder

Prince wrote:

I need to create a script for compare/copy only folder with subfolder "- 02 -"
Final result will be:

c:\example\richard\- 02 -
c:\example\stephan\- 02 -

The other folder name must be exclude

That's sound ambiguous to me.

Do you want to
- copy only folder with subfolder "- 02 -"
- or copy only the subfolder "- 02 -"

Or are these the same, i.e. is there always only one subfolder?
Prince

Copy/compare folder

Sub folder question
Hi

I have read a lot of post but I think this my request nobody ask to this forum for a possible solution.
This is my request if possible. I have this scenario:

c:\example

in this folder I have this subfolder

c:\example\carl\- 01 -
c:\example\richard\- 02 -
c:\example\helena\- 03 -
c:\example\stephan\- 02 -
c:\example\morgan\- 04 -
c:\example\mary\ - 03 -

I need to create a script for compare/copy only folder with subfolder "- 02 -"
Final result will be:

c:\example\richard\- 02 -
c:\example\stephan\- 02 -

The other folder name must be exclude

Is this possible?

Thanks for an help

Prince