Object Reference Error with Move File Action

Hi there,

I’m working on building out a task that will download a .txt report, move that to a designated folder, and rename the file. I’m trying to use the Move File action but I get the error “Move File: Object reference not set to an instance of an object” but I’m not understanding how that’s the case. Below is a screenshot. In my Wait for Download action, you can see that I have the monitored folder selected as my Downloads folder, which is where the file is stored, and I’m designating the downloaded file as “CLF410US_Report” for later use. I threw in a Delay action because the download takes about 30-60 seconds. Then I have the Move File action where I’m moving it from that saved value by last modified date in case there are more of the same file downloaded and to move it to a folder already created on my drive. Can someone let me know where I’ve gone wrong here?

Hi @Darcy_Pope,
your wait for download activity making “.tmp” and that’s why you are not able to move it.
Kindly do this
→ put some delay inside wait for download after click button.
->increase timeout of wait for download activity.

Hi @Darcy_Pope, welcome to the Community.

Debug the process. Before moving the file, ensure that the file actually exists in the expected location. If the file doesn’t exist, you’ll receive an error when trying to move it.
If you’re still experiencing issues, try using a different file to see if the error persists. This can help you determine if the issue is with the specific file or if there’s a more general issue with the workflow.

Hope this helps,
Best Regards.

This error means you are trying to use a variable that has not been initialized (usually because it was not assigned a value).

Thank you! This fixed my error.

1 Like

@Darcy_Pope Welcome. Happy automation

Using delays like that isn’t usually a good solution. You should designate that the Wait for Download activity ignores tmp files.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.