Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Tuesday, February 18, 2025

Get a list of filenames in a folder, in text format

Windows (Command Prompt)

  1. Open Command Prompt (Win + R, type cmd, press Enter).
  2. Navigate to the folder:
    cd "C:\path\to\your\folder"
  3. Run this command to output filenames to a text file:
    dir /b > filelist.txt
    This will save the filenames (without details) into filelist.txt in the same folder.

Thursday, March 10, 2011

Download file from server

Download xlsx file from server
(already created)






public void GenerateXLSXFile(string fileName, ExcelDocument theDocument)
{
string filePath = Server.MapPath("~/TempFiles/" + fileName + ".xlsx");
theDocument.esd_WriteXLSXFile(filePath);

Response.Clear();
Response.AddHeader("Content-Type", "application/vnd.ms-excel");
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ".xlsx");
Response.WriteFile(filePath);

Response.Flush();
System.IO.File.Delete(filePath);
Response.End();
}



Thursday, February 5, 2009

Dos - glue (sql) files together

I wanted to concatenate files together
I had like 20 sql files
I knew there had to be a way ... other than the "hard" way.

Romica helped me out ;)

this is what he did:
opened a CMD
and go:

type *.sql >> t.sql

done