Bring For-each Loop container to Control Flow Pane and configure as shown below. I used the VarSourceFolder variable as Directory. If we need to change Source Folder Path,We do not have to open the package , Instead we can just change the value for this variable by using SSIS Configuration.
The Information we want to extract is File Name and extension , Choose that.
Create variable VarFileName to hold the FileName and extension
Create a new variable VarArchiveFullPath, Click on that and press F4, that will take you to properties. Go to expressions and paste below expression
@[User::VarArchiveFolder]+"\\"+ Replace(Replace(Replace(Replace( @[User::VarFileName],".","_"+Substring((DT_WSTR,50) GETDATE(),1,19)+"."),"-",""),":","")," ","_")
Create a variable VarSourceFullPath, this will have Source Folder path and file name together. Write expressions on it as shown below
Bring File System task to Control Flow Pane and configure as shown below
Let's run our SSIS Package and see if files are moved and renamed.