Re: Script to move oldest .ready file
- From: DBT <dbthomson76@xxxxxxxxx>
- Date: Wed, 24 Sep 2008 10:51:11 -0700 (PDT)
On Sep 24, 8:13 am, "Pegasus \(MVP\)" <I....@xxxxxxxxxx> wrote:
<dbthomso...@xxxxxxxxx> wrote in message
news:f4d2f0c9-fe9c-4751-a71c-68c8988163e6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I need to create a script that will move the oldest .ready file in a
specific directory to another specific directory.
Can anyone help me create a script?
TIA!
You could re-invent the wheel and write a script to compare the various file
dates with each other or else you could rely on standard system tools and do
the job with this batch file:
@echo off
set Source=d:\Some Folder
set Target=c:\Some other folder
for /F "delims=" %%a in ('dir /b /o-d "%Source%\*.ready"') do set File=%%a
echo Moving "%Source%\%File%" to "%Target%"
rem move /y "%Source%\%File%" "%Target%"
Remove the word "rem" in the last line to activate the batch file.
Thanks! Much appreciated.
.
- Follow-Ups:
- Re: Script to move oldest .ready file
- From: Pegasus \(MVP\)
- Re: Script to move oldest .ready file
- References:
- Script to move oldest .ready file
- From: dbthomson76
- Re: Script to move oldest .ready file
- From: Pegasus \(MVP\)
- Script to move oldest .ready file
- Prev by Date: Re: How to read text file
- Next by Date: Re: How to read text file
- Previous by thread: Re: Script to move oldest .ready file
- Next by thread: Re: Script to move oldest .ready file
- Index(es):
Relevant Pages
|