PowerShell Tutorials : Splitting up CSV files

preview_player
Показать описание
How to split up CSV files using PowerShell. In this video ill be showing you how to create a function to split up CSV files using powershell, youll be able to provide a CSV filepath and the number of CSV output files you'd like.

Tags:
PowerShell
CSV
Splitting up CSV files
Programming
Scripting
Automating
JackedProgrammer
Coding
Рекомендации по теме
Комментарии
Автор

thanks, this is very helpful, but I have a different need, maybe you can point me in the right direction. I have a CSV that contains the contents of a database. The CSV is 3.5 GB. The database needs have several tables, not just 1 HUGE table. To address this, I need to extract from a starting comma to a stopping comma and write all of the rows between the two into a csv file. Then change the start and stop comma numbers and run it again, output to another file and so on. For example, startcomma = 0, stopcomma = 104, filename = "Table 1"
Example, startcomma = 105, stopcomma = 186, filename = "Table 2"
and so on until all of the tables are extracted.
Thanks,

roydbaird
Автор

Thanks for this content. this was really big help in my project. Hi Jack, I sent you and email, hope you have time to read it. big thanks

sonnyrealjr
Автор

Great tutorial
how do you remove the quotation "" around the field ? i tried to use convertCsv but i failed
thank you

tarekgerges
Автор

I have 2 csv files that is folder and sub foldeelr relative paths...now my task is compare that 2 csv files and print unmatched files with absolute path .... pls help me on this....???

Million_Dreams_
Автор

Super helpful video! glad I found it. Thank you! Can we give dynamic names for output files based on the value in a column?

TheCuriousMavrick
Автор

Hi, any chance you could do a video on how to manager PDF files (read data, export…) with PowerShell?

allferryrocha
Автор

do you have video more than like this example you're going to rename the file based on the data inside, which define in every header.

Example: My File inside
invoice no. | Doc type | Date tx | Tax Info | Company Code | Time Tx |
00001 | 01 |20230703| 123456 | 441 |120000

rename the file to:

where formats:

xxx – 3-digit company code registered in BIR

XXXX – 4-digit branch code registered in BIR

YYYYMMDD - transaction date (Year, Month, Day)

HHMM – transaction time (Hour, Minute)

Regular/SI/Return/Void – type of transaction

nnnn – file sequence number as this may depend on the number of transactions on a specific date and time. It starts at 0001 up to 9999.

sonnyrealjr
join shbcf.ru