Deleting old files on a remote computer with psexec does not work Share on Facebook Post on reddit Tweet on Twitter Share on LinkedIn Home › Forums › Scripting › General Scripting › Deleting old files on a remote computer with psexec does not work This topic has 9 replies, 3 voices, and was last updated 4 years, 5 months ago by BumbleBee. Viewing 1 post (of 1 total) Author Posts BumbleBeeMember Mar 30, 2017 at 4:05 am #166938 Hi, I’m running this script, but it does not work. I tried to change @path to D:Logs_Archive but it still does not work. What am I missing? D:scriptsLogRotationMM>psexec \192.168.1.2 forfiles -p “D:Logs_Archive” -s -m *.rar /D -7 /C “cmd /c del @path” PsExec v2.2 – Execute processes remotely Copyright (C) 2001-2016 Mark Russinovich Sysinternals – http://www.sysinternals.com ERROR: Invalid argument/option – ‘@path’. Type “FORFILES /?” for usage. forfiles exited on 192.168.1.2 with error code 1. Your help is appreciated. Thanks Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic.