Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Help Needed With Creating A Log Of Files In A Folder

forums forums SQLyog Query Builder and Schema Designer Help Needed With Creating A Log Of Files In A Folder

  • This topic is empty.
Viewing 3 reply threads
  • Author
    • #12909


      i am an absolute newbie in this thing.

      • can anyone help me to build a table that lists all files in a specified folder so whenever a file is copied to that folder the table should update.
      • i need the list to retain the names even if the file is moved from that folder or deleted. later the data would be deleted by a scheduler.
      • also i need the table to record the time exactly when the file was copied into that folder.

      many many thanks in advance


    • #34119

      Well .. this is actually more an application-like question than a SQLyog (or MySQL) question, I think. No client does such thing directly and the MySQL server does not either.

      Also the MySQL server does not have functionalities to access to the files system except for writing its own logs etc..

      What option I see is to execute (dependng on the OS) system commands like “dir” or “ls” parse the output, create a CSV file and import the CSV file to MySQL. But most Unix/Linux users would probable write a small Perl, Python or similar script that both parses the output from “ls” command and inserts to MySQL (and thus avoiding an intermediate CSV file). In either case it will involve a little traditional programming.

      And for clarity: you are welcome to ask such questions here, but we at Webyog do not help with users' application programming. And I don't think you should expect much help in this respect from other users here either.

    • #34120

      thank you so very much for your answer.

      thing is dirlist > txt (i am using windows) shows the current listing of files. when the files are deleted, the log is not retained.

      could you please suggest where do i get help with this?

      thanks again.

    • #34121

      OK .. I understand.

      I think maybe the application that saves the files should write a log?

Viewing 3 reply threads
  • You must be logged in to reply to this topic.