Re: Script to move oldest .ready file
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Wed, 24 Sep 2008 20:12:03 +0200
"DBT" <dbthomson76@xxxxxxxxx> wrote in message
news:596556ef-3070-4150-ae1a-847a4fe2d87d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
===============
Thanks for the feedback.
.
- References:
- Script to move oldest .ready file
- From: dbthomson76
- Re: Script to move oldest .ready file
- From: Pegasus \(MVP\)
- Re: Script to move oldest .ready file
- From: DBT
- 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: Help with Functions and Variables
- Index(es):
Relevant Pages
|