Post a reply :: Support Forum

Username
Subject
Message body
Options

Add an Attachment

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


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

Topic review

Author Message
martin
Post
Unzipping archive on the remote side is problematic.
You might be able to use Session.ExecuteCommand to execute unzip on the server, if you fit into the method limitations.
See
https://winscp.net/eng/docs/library_session_executecommand
https://winscp.net/eng/docs/remote_command
ahd262
Post
No I would prefer to execute the process only in remote (faster)
For each file saved in source folder I have to :
mv to its specific folder
unzip it
and rename the unzipped files
martin
Post
Do you want them to be extracted in-place on remote side (complicated, if possible at all) or download the archives, extract and upload the contents?
ahd262
Post
Sorry the both (source & destination) are in remote
ahd262
the both in remote
martin
Is the target folder local or remote?
ahd262
Hi
I would like to loop on each zip files in a source directory and move the unzipped content to the folder N
It means if i ve 3 zip files i ve to read and unzip 3 files and move the content resoectively to the folder 1, 2 then 3
The nuumber of files is not known in advance
Do u advise me to use Session.ListDirectory or a foreach loop container with SSIS ?
Thx
martin
Do you want to iterate a list of remote files and move every file to a different remote folder based on some rules?

You need Session.ListDirectory and Session.MoveFile methods of WinSCP .NET assembly:
https://winscp.net/eng/docs/library
https://winscp.net/eng/docs/library_session_listdirectory
https://winscp.net/eng/docs/library_session_movefile
ahd262
Hi
on a daily basis i receive a number of zipped files in a remote folder
The number and the name of these files changed each day and they aren t known in advance
I need to move each of one into an appropriate folder

I m using SSIS and would like to know how in a loop to be able to read them and to move them

Thx for your help

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License