Move CSV file to different location

@Sahil_J_Patel - Say if only one file gets created everyday which you wants to move from downloads to different folder…here is the code…

StrCSV = Path.GetFullPath(Directory.GetFiles(Environment.ExpandEnvironmentVariables("%USERPROFILE%\Downloads"),"*.csv").OrderByDescending(Function(d) New FileInfo(d).LastWriteTime).First)

above code pull the very recent file from the downloads folder which you can pass it to Move File activity…

In the example above I am moved to my desktop…

Environment.ExpandEnvironmentVariables(“%USERPROFILE%\desktop”)

image

Hope this helps…

1 Like