Need help creating a task scheduler task to move files over a network.

nzdreamer55

New member
Hello everyone,

I need to have a task run that will move the contents of a folder from one computer to another over my home LAN. Files get downloaded during the night on one computer and then need to be transfered to another. Usually I am doing this by hand, but then though maybe I could get the task scheduler to do it for me.
I understand how to create a task, however I am having trouble with the action tab. I was thinking that I should start windows explorer (where is explorer located for win 7 x64 machines?) under the action tab, but once I do this I am not sure how to tell explorer to check the source folder, select all the files in it and then move it to the target folder.

I took a look through the tutorials of the forum, but didn't find what I was looking for. If you can help or just point me to more resources that would get me going I would be thankful.

Thanks in advance.
Steve
 

My Computer

Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
So you have two computers, A and B.

A gets the downloads and they are in C:\Downloads (for example).

The name of computer A is CompA and the name of the share for C:\Downloads is Downloads.

You want to move them to computer B in C:\Otherfolder (for example)

If the folder names will always be the same then you can use the move command directly from the scheduled task. You set this up on computer B.

Open Task Scheduler
Under Action, Create basic Task
Name: Move Download Files
Description: Move files downloaded overnight from Computer A to Computer B
Click Next
Select Daily
Click Next
Set date and time
Click Next
Select Start a program
Click Next
In Program/Script box, enter: cmd

In the Arguments box, enter: /c m
ove /Y \\CompA\Downloads\*.* C:\Otherfolder
Click Next
Check the results then click Finish

When this runs, a Command Prompt window will open, the move will take place then the window will close. If you want it to stay open so you can see the results, change /c to /k.

If you want this to run when you're not logged on then under the General tab of Task Scheduler, select Run whether user is logged on or not.

You could also set this up on Computer A by changing things a bit.



 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Thanks for the help ztrucker. So I need to create the task on the machine that has the files initially as the receiving computer does not have access to the drive of the initiating computer (Computer A gets the files, Computer B needs the files, but computer B does not have access to Computer A's drive. Computer A has access to the drives on computer B. I can manually drag and drop files from computer A to computer B).
Under the action I put to start a program and typed cmd into the program box (I didn't include a path, but I don't think that you need to with this command). I tried to swap things around a little. Can you take a look at this and tell me if you think that there are any problems with this line? For some reason when I tried to run the task it said running, but no files moved.

/c move /Y D:\Downloads\TV Torrent DL\Converted\*.* \\Pedro\Hp.Win7.MX300EIDE.F\Converted Video

Thanks for the help
Steve
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
After some playing around I decided to try just moving 1 file (there was only 1 file in the initial folder) to the folder that is above it. I figured that if the move command worked to do this then the problem was else where. So in a command window I typed the following. I used windows explorer to generate the directories so that I would not make a typing mistake. For some reason it tells me that the syntax isn't correct

C:\Users\Kira>move/Y D:\Downloads\TV Torrent DL\Converted\*.* D:\Downloads\TV Torren
t DL
The syntax of the command is incorrect.

I guess I need help with this first then once I get this figured out can use it in the task scheduler.

BTW, I am running windows 7 x64 SP1.

Steve
 

My Computer

Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
One more update. I tried the following and get a different error message. I switched to the folder where the file resides in case that was causing a problem.

D:\Downloads\TV Torrent DL\Converted>move/Y D:\Downloa~\TV Torr~\Convert~\*.* D:\Downloa~\TV Torr~

The system cannot find the file specified

Hope this can help you trouble shoot this with me. Thanks

Steve
 

My Computer

Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
Put a space between move and the /Y:

move /Y D:\Downloa~\TV Torr~\Convert~\*.* D:\Downloa~\TV Torr~

or use full names enclosed in double quotes:

move /Y "D:\Downloads\TV Torrent DL\Converted\*.*" "D:\Downloads\TV Torrent DL"
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Thanks! Both those ideas did the trick. Here are the results of two tests

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Kira>move /Y "D:\Downloads\TV Torrent DL\Converted\*.*" "D:\Downloads\T
V Torrent DL
D:\Downloads\TV Torrent DL\Converted\HD 720p_ The Walking Dead S01E01 720p HDTV
x264-CTU.ipodtouch.mp4
1 file(s) moved.


I then moved the file back and tried to move it to the other computer

C:\Users\Kira>move /Y "D:\Downloads\TV Torrent DL\Converted\*.*" "\\PEDRO\Hp.Win
7.MX300EIDE.F\Converted Video"
D:\Downloads\TV Torrent DL\Converted\HD 720p_ The Walking Dead S01E01 720p HDTV
x264-CTU.ipodtouch.mp4
1 file(s) moved.

It took a little while as this file is 640mb, but it worked!

I also got the task schedule to fire correctly and move the file.

Thanks for the help. If you can help me with the next step that would be a bonus, but if not I can just leave it as is.

Is there a way to get this task to fire on an event say when a file is downloaded into the first folder? That way a timer would not be needed. I'm not sure if there is an event that would work to trigger something like this.

Thanks again for the help.

Steve
 

My Computer

Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
You could probably do it with a never ending batch file that wakes up every so often, check to see if the file is there and if yes, move it.

If it's not always the same filename then this gets a lot harder, at least from a batch file perspective. Doable but I'd need to think about it more.

What are you using to download the file? Perhaps it has the capability to launch a program or script when it completes?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Something like this works for me:
Code:
@echo off

:WaitMore

Rem Now check To see If there  are any files in the
Rem download directory to be moved.
For %%A in ("D:\Downloads\TV Torrent DL\Converted\*.*") Do move /Y "%%A" "\\PEDRO\Hp.Win7.MX300EIDE.F\Converted Video"

Rem Wait 30 minutes
timeout /t 1800
goto WaitMore
Put a link to this in your Startup folder and it will launch at boot time. If you want it to wait before doing anything, move the timeout to the beginning.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
ROBOCOPY.EXE is included with Windows 7 (Server 2008...)

I use ROBOCOPY.EXE and the /MOT switch for this:

C:\Windows\System32\Robocopy.exe "d:\data\SharedFiles\Dropbox" "\\otherserver\Backups\DropboxBackup" /s /e /r:0 /w:0 /MOT:5

In the string above, it checks for changes in the source directory every 5 minutes.

ROBOCOPY.EXE /?
 

My Computer

OS
OS
Why to use scripts when there are softwares available in the market to do the same. Scheduled file transfer then even notifying you when the transfer is complete. According to the requirements I found that GS Richcopy works best. Not only it provides the above solution but other features like NTFS permissions, multi threaded file transfer, real time file sync. Currently I'm using its enterprise version. Try it, it never disappoints!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 10 64 bit
Back
Top