Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder with .mp4 files which i show online using web application. The rest of information about the video files is taken from a database.

I have n files in the database and n-6 files in my local folder.

How do I find the names of all the missing files in my local folder using the Windows command line?

share|improve this question
    
I think you need to reword this question, it's difficult to understand. Do you want to list the files which are in your database but not your folder? – hippietrail May 9 '11 at 7:55
    
Sorry, yep this is what i want. I can get list of video filenames from database. – eugeneK May 9 '11 at 8:15
    
What kind of "database" is this? – slhck May 9 '11 at 9:13
    
It is MSSQL but i can select just the filenames with "," as delimiter – eugeneK May 9 '11 at 9:39
1  
some kind of paradox question? :) – kokbira May 9 '11 at 12:29

Well, since you can get the file names (not with file path) from the database to a TXT file, you have to sort it alphabetically (use OpenOffice Calc or MS Excel - copy and paste TXT conntents to a column in a worksheet page, sort it alphabetically and copy and paste back to a TXT file), you can use that:

  1. Start > Execute > cmd

  2. Execute that command (where c:\users\eugeneK\desktop\mymusic\ is the path of your local folder):

    dir /b /on c:\users\eugeneK\desktop\mymusic\ > c:\users\eugeneK\desktop\mymusic\local.txt
    
  3. Then use (where c:\users\eugeneK\desktop\database.txt is the file list obtained from database and sorted alphabetically):

    fc /l /c /n c:\users\eugeneK\desktop\database.txt c:\users\eugeneK\desktop\mymusic\local.txt 
    
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .