|
Answer» Greetings. I am trying to do a huge inventory of all the data on our server at work. I need to create an index in EXCEL and would like to know if there is a way to copy the filenames of the files in a given folder in the file tree over to a particular column in Excel? Otherwise I will have to click through tens of thousances of files and and PASTE them into Excel. Is there a batch/copy method? Or is there a way to creat a file tree in DOS, copy it into a txt file and then use comma delimited or something to separate it in Excel? I will want the file name and extension in separate columns. THANKS for your help.This should create a csv file that can be imported into Excel. You can MASSAGE the data easier in Excel than in the cmd shell.
Code: [Select]@echo off for /f "TOKENS=* delims=" %%x in ('dir /a:-d /s /b c:\') do ( echo %%~dx%%~px,%%~nx,%%~xx >> input.csv )
Change c:\ to any directory.
Good luck.
|