Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.