Re: Filenames into an Oracle table?

From: Thomas Kellerer <>
Date: Tue, 23 Sep 2008 18:43:54 +0200
Message-ID: <>

blindsey, 23.09.2008 18:20:
> What I'm trying to do is this:
> Write a script that will pull a list of filenames with a specific
> extention, from a specific directory, into an Oracle table.
> I've looked at the commands to shell out into DOS but I don't see how
> to do it.
> This is a script I will be running multiple time with the list of
> filenames possibly changing, not a one-time thing.
> Any ideas?

This is a Windows batch question (I assume you are not really running MS-DOS) and has (nearly) nothing to do with Oracle

But something along the lines (in a batch file)

  • snip -------- @echo off echo -- Insert filenames into table > do_insert.sql for %%i in (*.zip) do echo insert into the_table (filename) values ('%%i'); >> do_insert.sql sqlplus user/password_at_db @do_insert.sql
  • snip --------

should do the trick

Thomas Received on Tue Sep 23 2008 - 11:43:54 CDT

Original text of this message