Upload multiples files

Advertisement

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: uplod multiples files

Yes. How do you specify those multiple files? Do you have a fixed list of files you want to upload? Or do you want to upload all files in some folder? Or all files that match some wildcard/mask or other criteria?

Reply with quote

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

upload to files

We are developing a backup application that uploads to the server those files that have been changed, being able to upload all the files in a directory, some or none.
That is why what we thought was to generate a list of files and path to upload and upload them with just one session to save time.
Are there or do they have any routine that can do this other than a file-to-file control?
Thank you

Reply with quote E-mail

Advertisement

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

uplod multiples files

Hi,

Thank you very much for all the answers.

One last question, how can I tell the synchronizationResult.Check() statement to ignore the errors? It turns out that when it finds an open file, it gives an error and stops uploading even if we control the error with a try catch block

Thank you so much for everything

Reply with quote E-mail

Advertisement

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

uplod multiples files

Hi,

Thank you for all the answers and sorry for the delay in thanking.

And finally I would like to know if you can synchronize file by file, unfortunately I have to do the project file by file and not directory by directory.

Thank you very much for all the answers.

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: uplod multiples files

Angel-ito wrote:

Is it possible to keep multiple file versions in directory sync?
I do not know what you mean. What "versions"? Please elaborate.

Is it possible to sync a directory and not internal directories to sync?
In other words, synchronization is not recursive
See https://winscp.net/eng/docs/faq_script_non_recursive

How can I make a mask so that it saves the files from a certain date and that it does not go through the subdirectories.
See https://winscp.net/eng/docs/file_mask#size_time

Reply with quote

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

Re: uplod multiples files

Hello,
I mean the following:
A file is modified on Monday, Tuesday and Wednesday. I would like to know how it can be done to have the three versions in the remote directory.
We will be able to implement a differential or incremental copy system.

Thank you

Reply with quote E-mail

Advertisement

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

Re: uplod multiples files

And one last question,

How can I make "FileMask" contain a non-recursive option and make the date greater than or equal to a given date.

Thank you

Reply with quote E-mail

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

re: Uplod multiple files

Hello, when I use the PutFiles function (to record a directory using the mask property "*. *;> 2020-05-01 | * /" I always get the same error, I attach my code
Error transferring file 'C: \\ projects \\ test.txt.txt'. \ R \ nCopying files to remote side failed. \ R \ nFilename invalid"}
string LocalDirectory = currentDir + @ "\ *";
TransferOperationResult transferResult;
transferResult = session.PutFiles (LocalDirectory, RemoteName, false, transferOptions);

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: uplod multiples files

Angel-ito wrote:

A file is modified on Monday, Tuesday and Wednesday. I would like to know how it can be done to have the three versions in the remote directory.
You can append a timestamp to the destination filename.

We will be able to implement a differential or incremental copy system.
Sorry that's too broad/vague. We do not know anything about format/structure of your files.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: re: Uplod multiple files

Angel-ito wrote:

Hello, when I use the PutFiles function (to record a directory using the mask property "*. *;> 2020-05-01 | * /" I always get the same error, I attach my code
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

uplod multiple files

Hello again

Is it possible to get the list of files to be synchronized in a directory before uploading them?

Thank you very much

Reply with quote E-mail

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

uplod multiple files

Hello there,

Is it possible to retrieve the hash of a file that is on the server?

In other words, I would like to check the hash of the file on the server with the file to be copied and if the hashes are different then replace the file on the server.

Thank you

Reply with quote E-mail

Advertisement

Angel-ito
Joined:
Posts:
15
Location:
Madrid-Spain

Re: uplod multiple files

Hello,

Could you send us an example of this functionality in C#?

Thank you very much and as always, sorry for the inconvenience

Reply with quote E-mail

martin
Site Admin
martin avatar

Re: uplod multiple files

Sorry, but this is not a code writing service. What did you try? Did you face any specific problem?

Reply with quote

Advertisement

You can post new topics in this forum