All Questions
Tagged with csv command-line
32 questions
-1
votes
1
answer
73
views
What is causing the xcopy file from having an error in it?
I am new to xcopy. I am trying to move a file that is in excel format to a new destination and as a csv file. I have to do this so that the DMExpress ETL job can move the file and then read it. This ...
2
votes
1
answer
2k
views
Use REGEX only to group multiple key value pairs on line with anchoring text?
TL;DR: How can I grab a series of key:value pairs that are comma separated, but only if they start with specific strings?
Hello,
I have a situation where I have a block of text with multiple lines, ...
0
votes
2
answers
3k
views
Using CSV as source to copy files
I have a CSV file (semicolon-separated, actually) in Windows,
with column header info.
One of the columns contains a partial filename;
it's a filename without path or extension.
I've been trying to ...
2
votes
1
answer
2k
views
How do i return true/false on get-content command for each username inside C:/Users?
We want to eliminate the existence of a bad config file we've identified (and also have the manual fix for) from within every users appdata folder. The config file only exists here and there and not ...
0
votes
2
answers
455
views
How to delete blank rows in csv files using the Miller command line tool?
I have a csv file (on Mac) with many blank rows.
I am using the Miller command-line tool for other processes and would like to remove blank rows also using that tool.
I can't find anything in the docs ...
2
votes
0
answers
786
views
Open Colon delimited file from command line in Excel
I want to create a shortcut or a command to open a file that uses a colon : as a delimiter in excel.
I know via the UI I can
click "From Text/CSV"
select a file
click Import
select a ...
1
vote
1
answer
806
views
Automatic folder creation using Terminal
I am trying to sort files on my NAS using the Terminal from Mac OSX.
I am planning on using the following steps:
create folder for specific year
create folder for each month
use the "Find" command to ...
0
votes
2
answers
3k
views
Retrieve folder and subfolder content to CSV with relative paths
I found this to get the content of a folder and its subfolder (files only) in a CSV file:
dir -recurse | Where-Object { !$_.PSIsContainer } | Select FullName |
convertto-csv | out-file "test.csv"
...
2
votes
1
answer
170
views
Why are the number of lines of grep and grep -v with same pattern not equal to number of input lines?
How is this possible (the two regexes are identical):
tmp$ grep "^[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*$" 2018.csv > 2018a.csv
tmp$ grep -v "^[^;]*;[^;]*;...
0
votes
2
answers
187
views
Get element in CSV file, make it an integer and add it to the beginning of the line
I have a CSV with hundreds of entries and I'm trying to do the following:
1. Get the first element (decimal number, ex: 1.01)
2. Remove the decimal part of the element (ex: 1)
3. Add the new ...
1
vote
1
answer
704
views
How to move the folders to new directory based on their match in csv file?
In my present directory I have many folders like F1, F2, F3, F4, F5, F6, F7, F8, F9, F10.
I have a csv file "dan.csv" in the present directory which has a column with folder names.
csv file looks ...
0
votes
1
answer
403
views
Dynamically changing dates in command Prompt
I am trying to write a command prompt in changing file names for a monthly report I run and am automating.
I have the export file as "Export.xlsx", and I want to change it to 02 2018.xlsx, 03 2018....
0
votes
0
answers
776
views
when I use TaskschedulerR package why doesn't my R Script save the csv file.?
I have a R Script that uses write.csv to create a CSV file.
This works fine when I run it from the command line, but no file is created when I run the script using TaskschedulerR. Why would it let ...
0
votes
1
answer
308
views
Automatically run application multiple times with files from same folder
I hope this question is appropriate for this forum.
I have a standalone application - an .exe file called ratingsCalculator.exe. When I open it manually it first asks me to type the filename of a csv ...
0
votes
2
answers
1k
views
Rename csv file removing the date
i need to rename a csv file and remove the date:
I have file_20170101.csv (The date will change every day)
and i need just to keep file.csv
How can i make this as a bat file in order to run it every ...
1
vote
4
answers
7k
views
BATCH Script - how do I count occurrences of COMMA in a CSV or TXT file?
I have bunch of CSV files to process daily. They have a constant form with 19 COMMAS to appear in every file. In the file, there is a mixture of strings, timestamps, integers and float digits. The ...
4
votes
1
answer
2k
views
LibreOffice, how can I keep the leading zeroes during export using the command line?
I am using LibreOffice 5.0.5.2 in an Ubuntu 15.10 docker container to convert arbitrary incoming spread sheet files into canonical CSV files:
/usr/lib/libreoffice/program/soffice.bin \
--convert-...
2
votes
1
answer
5k
views
Export a csv file to multiple csv files with batch command
I have a 100 line csv file, with 5 values per line. I am looking for a way to export each line to its own csv file adding a 2 line header to each. I have used the split command seen elsewhere to ...
0
votes
1
answer
40k
views
Command Prompt output to CSV
I'm using the forfiles command to list files and folders (included sub folders) which is piped to a text file. My subsequent process requires this output to be in comma delimited format (.csv).
This ...
0
votes
2
answers
159
views
Reference cells in column of .csv from command line
I have a column B in my.csv in which each cell references the filename of a document in a directory source_directory/.
I'd like to grab each of those names so I can use them as args for other shell ...
1
vote
2
answers
4k
views
Why doesn't my Python script save the file when I use Task Scheduler?
I have a Python script that uses csv.writer to create a csv file. This works fine when I run it from the command line, but no file is created when I run the script using Windows Task Scheduler. The ...
1
vote
1
answer
1k
views
Using the with cURL command-line tool on Mac, What can I do to this script to ask it to fetch stock data which comes back WITHOUT commas?
cd documents/quoteUpdate
while true
do
curl -o quotes.txt -s "http://download.finance.yahoo.com/d/quotes.csv?s=goog,aapl&f=sl1c1p2pt1"
echo UPDATED:
date
sleep 10
done
0
votes
1
answer
535
views
How can i make changes to this file Encoding?
I have these 3 files
21/08/2014 07:15 PM 122 Tw2AWK.csv
21/08/2014 07:15 PM 125 Tw2Notepad.csv
21/08/2014 07:15 PM 119 Tw2REPL.csv
C:\myfiles>file Tw2AWK....
24
votes
2
answers
61k
views
Unix command to get number of lines in a CSV file
I have to get the count of lines from incoming CSV files.
I have used the following command to get the count.
wc -l filename.csv
Consider a file coming with 1 record, I am getting some files with ...
0
votes
1
answer
799
views
Using Command Prompt to create Retina Vulnerability Report CSV
I have scanned several computers on my network which have been flagged as needing certain fixes. I am able to generate reports in Retina fine using the GUI report view, however, I would like to be ...
-2
votes
1
answer
3k
views
Deleting the first column of csv via batch commands [duplicate]
Is there a way to delete the first column of a csv using a batch command file? I have data in this first column but I want to get rid of it and output a new file starting at the 2nd column.
Thanks!
1
vote
4
answers
12k
views
How can a batch file overwrite contents of output each time?
I have this batch file below, which is a simple emulation of Unix’s head command – it will read the first COUNT rows from the input .csv file (named as a command-line parameter). However, unlike the ...
3
votes
4
answers
12k
views
Can I use a batch file to remove blank columns in a .csv
I have nine columns in my current .csv file, however, the 2nd and 3rd columns are blank and I want to get rid of them. Is there a way to use batch commands to remove these empty columns from my .csv ...
0
votes
1
answer
5k
views
Export the first three rows of a .csv into another .csv using batch commands
I have a .csv file with a number of rows but I only want the first three rows and none of the rest. How can I use a batch file to export those top 3 rows of my .csv file into another file .csv file? I ...
4
votes
1
answer
547
views
CLI program for xlxs -> csv conversion? [closed]
Is there an foss command line program that can convert between Excel (.XLXS) and Comma Separated Value (.CSV) files?
17
votes
3
answers
16k
views
Interactive console based CSV editor
Although spreadsheet applications for editing CSV files on the console used to be one of the earliest killer applications for personal computers, only few of them and even less documentation about ...
15
votes
6
answers
35k
views
Unix command-Line CSV viewer [closed]
Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)?
I find it easy to simply edit CSV files by writing it manually (since all you need to ...