captainfearless
New member
- Local time
- 7:45 PM
- Messages
- 23
Hi everyone,
I've recently been setting up some automation via TS with great success, until now.
I want it to delete daily all content, sub folders and files etc from my TV shows parent folder.
I am using the following shell script (.cmd batch file)
@echo off
setlocal enableextensions
if {%1}=={} goto :HELP
if {%1}=={/?} goto :HELP
goto :START
:HELP
echo Usage: %~n0 directory-name
echo.
echo Empties the contents of the specified directory,
echo WITHOUT CONFIRMATION. USE EXTREME CAUTION!
goto
ONE
:START
pushd %1 || goto
ONE
rd /q /s . 2> NUL
popd
ONE
endlocal
from this link Create Batch file to delete files and subfolders, but not root folder
I have it set up thus "C:\Scripts\CleanDir.cmd" \\Users\Administrator\Downloads\Deluge Completed in TS, and it has set everything after the commas as the argument.
It runs, it provides the result (0x1 the same as other tasks that do work), but nothing is deleted.
Can any more experienced user tell me what i'm doing wrong please? I'm guessing it's a comma or gap thing, something simple!
I've recently been setting up some automation via TS with great success, until now.
I want it to delete daily all content, sub folders and files etc from my TV shows parent folder.
I am using the following shell script (.cmd batch file)
@echo off
setlocal enableextensions
if {%1}=={} goto :HELP
if {%1}=={/?} goto :HELP
goto :START
:HELP
echo Usage: %~n0 directory-name
echo.
echo Empties the contents of the specified directory,
echo WITHOUT CONFIRMATION. USE EXTREME CAUTION!
goto
:START
pushd %1 || goto
rd /q /s . 2> NUL
popd
endlocal
from this link Create Batch file to delete files and subfolders, but not root folder
I have it set up thus "C:\Scripts\CleanDir.cmd" \\Users\Administrator\Downloads\Deluge Completed in TS, and it has set everything after the commas as the argument.
It runs, it provides the result (0x1 the same as other tasks that do work), but nothing is deleted.
Can any more experienced user tell me what i'm doing wrong please? I'm guessing it's a comma or gap thing, something simple!
My Computer
- Computer Manufacturer/Model Number
- CCL 1010 AMD Base Unit
- OS
- Windows 7 Ultimate x64
- CPU
- AMD Athlon 64 x2 Dual Core Processor 5200+ 2.70
- Memory
- 2.0gb
- Graphics Card(s)
- Sapphire HD5450 1GB DDR3
- Sound Card
- Sapphire HD5450 1GB DDR3
- Monitor(s) Displays
- sony 40" tv
- Hard Drives
- 1 tb western digital
- Cooling
- Zalman cnps7000c super flower cooler