How to Automatically Copy Excel Files to a Shared Folder
Question details
The user needs to automate the daily process of copying an Excel workbook from a local drive to a shared network folder without manual intervention.

- Product
- Excel
- Device & OS
- Windows
- Scenario
- Backing up or distributing daily reports to a team by copying an Excel file from the local C: drive to a shared network destination.
- Observed behavior
- The file is currently being copied manually every day, and the user is looking for an automated scheduled solution using Windows Task Scheduler.
Ensure you have the exact file paths for both your local source Excel file and the destination shared folder, and verify that your Windows user account has read and write permissions for the network location.
Automate File Copying Using a Batch Script and Task Scheduler
Create a simple batch script using the Windows command line and schedule it to run automatically every day using the built-in Task Scheduler.
Using a batch script is the most reliable way to handle scheduled file transfers natively in Windows without needing third-party software. You can use the standard 'copy' command, or 'robocopy' for more advanced network transfers.
Open Notepad on your computer. Type the command: copy "C:\path\to\your\file.xlsx" "\\NetworkDrive\SharedFolder\". If you prefer a more robust tool, type: robocopy "C:\path\to" "\\NetworkDrive\SharedFolder" "file.xlsx".
Click File > Save As. Change 'Save as type' to 'All Files'. Name your file something like 'CopyExcel.bat' and save it to an easily accessible location.
Double-click your newly created 'CopyExcel.bat' file. Verify that the Excel file was successfully copied to the shared destination folder.
Press the Windows key, type 'Task Scheduler', and hit Enter to launch the application.
In the right-hand Actions pane, click 'Create Basic Task'. Name your task, set the trigger to 'Daily', choose 'Start a program' as the action, and browse to select your 'CopyExcel.bat' file. Click Finish to save the task.

Use an Excel VBA Macro to Save in Multiple Locations
Add a VBA macro to your Excel workbook that automatically saves a copy of the file to the shared folder every time you save your work.
Easily Manage and Share Spreadsheets with WPS Office
WPS Spreadsheet offers powerful built-in VBA support and seamless cloud syncing tools, making it easy to automate file backups, write macros, and share your work effortlessly.
- 1. Download and Install: Download WPS Office for free and install it on your Windows device.
- 2. Enable Developer Tools: Open WPS Spreadsheet, go to the Developer tab, and use the built-in VBA editor to configure your automated backup scripts.
- 3. Utilize Cloud Sync: Alternatively, save your workbook directly to a shared WPS Cloud folder to automatically sync updates with your team, eliminating the need for Task Scheduler entirely.

Frequently Asked Questions
Can I use 'robocopy' instead of the standard 'copy' command?
Yes, 'robocopy' is highly recommended for network transfers because it is more robust, can automatically retry failed copies, and only copies updated files if configured correctly.
Why did my scheduled task fail to copy the Excel file?
Task failures are typically caused by permission issues. Ensure the scheduled task is set to 'Run with highest privileges' and that the Windows user account assigned to the task has write access to the destination shared folder.
Can I automate saving an Excel file to a SharePoint folder using a batch script?
Yes, if the SharePoint document library is synced to your local PC via Microsoft OneDrive, you can treat it as a standard local folder path in your batch script.




