M
Markus Mannheim
Hi,
on an ftp Server I am running a script which clears all files in subfolders
of the users:
:: Variablen
set datei=d:\scripte\folders.txt
set start=d:\ftp
set start2=ftp
setlocal
d:
cd\
cd %start2%
dir /a:d /b >%datei%
FOR /F %%G IN (%datei%) DO (
cd %%G
pushd %start%\%%G%
cd\
cd %start2%\%%G%
for /F "tokens=1-3,* delims=\" %%A in ('dir /B /S /AD^|sort /R') do (
if "" NEQ "%%D" RD /Q /S "%%A\%%B\%%C\%%D")
del %start%\%%G%\*.* /q /f
copy d:\scripte\readme.txt ./y
d:
cd\
cd %start2%
popd)
del %datei%
set start=
set start2=
Now this script deletes all files whenever I run it via "Sheduled Tasks".
Because our users are working in different countries, the files should
remain for 24 hours, instead.
Some of you may have an idea how to read the date of a file and compare it
with the actual date?
For help thanks in advance,
Markus
on an ftp Server I am running a script which clears all files in subfolders
of the users:
:: Variablen
set datei=d:\scripte\folders.txt
set start=d:\ftp
set start2=ftp
setlocal
d:
cd\
cd %start2%
dir /a:d /b >%datei%
FOR /F %%G IN (%datei%) DO (
cd %%G
pushd %start%\%%G%
cd\
cd %start2%\%%G%
for /F "tokens=1-3,* delims=\" %%A in ('dir /B /S /AD^|sort /R') do (
if "" NEQ "%%D" RD /Q /S "%%A\%%B\%%C\%%D")
del %start%\%%G%\*.* /q /f
copy d:\scripte\readme.txt ./y
d:
cd\
cd %start2%
popd)
del %datei%
set start=
set start2=
Now this script deletes all files whenever I run it via "Sheduled Tasks".
Because our users are working in different countries, the files should
remain for 24 hours, instead.
Some of you may have an idea how to read the date of a file and compare it
with the actual date?
For help thanks in advance,
Markus