Hi everyone,
I have a windows 12 server,
it downloads certain files, I have two problems, hopefully someone can help.
I want to remove, "[eztv]" and i also want to remove, "WEB" from the files before they are sent to another drive.
the code i use - is this,
@echo off
setlocal enabledelayedexpansion
set deletestring=[eztv]
echo.
for /f "delims==" %%F in ('dir /b ^| find "%deletestring%"') do (
set oldfilename=%%F
set newfilename=!oldfilename:%deletestring%=!
Ren "!oldfilename!" "!newfilename!"
)
The problem is, i saved this as a .bat file and am running it from the same folder that the files are in - that works fine, it renames the file for the "[eztv]"
Question, how do i include the "WEB" in to the above,
Question, i have it set up correctly in task scheduler, but it shows as "running" and does not change the file name, neither does it stop running in the task scheduler either.
I've checked permissions for the file and they are all fine - can't figure this one out.
I am an absolute newbie at this and any help from you wonderful people would be most appreciated
Regards
SL