I create a new folder each month with the name of the mont (inside another folder) to store some Excel files that I download. Right now I have an automation that moves that Excel from the downloads folder to the folder that I choose, but I have to update the folder manually each month from StudioX. My question is: is it possible to move that downloaded file to the newest subfolder created so I dont have to update the destination folder manually each month?
After clicking the download icon from chrome. The Explorer window will appear. Use attachwindow and take one typeinto pass the FolderPath+FileName Like this
Where can I use this query? I suppose there is an activity where I can store the result of that query into a variable and then use that variable to store the file there?
Main.xaml: Cannot assign from type ‘System.Object’ to type ‘System.String’ in Assign activity ‘Set Variable Value’. You cannot convert a value of type ‘1-dimensional array of System.IO.FileInfo’ to ‘1-dimensional array of String’ because ‘System.IO.FileInfo’ is not derived from ‘String’.
Thanks! When I run it it looks like it works, but once the proccess is finished, it seems that the file has not been moved. These screenshots show the workflow.
The values of the variables are exactly as the sreenshot you sent me.
This “strRecentFolder” variable will hold only the recent folder name, so you need to add the path with this to move the file to the correct directory.
I think now in your process folder a new folder might have created and the files are moved to it I guess.
Use Path.Combine(“Your Directory Path”, strRecentFolder) in the Move file activity’s “To” value.