Hi
()
I have a file called NVidiaVersion.txt with a blank space on the beginning of the file
please is there a way to remove it so that it becomesCode:399.07
thanksCode:399.07
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
-
My guess is that il gatto wants a text editor that can do thorough search & replace, and likely one that can do this repeatedly, as their requests are rarely one-offs. Since all previous conversations were regarding Windows platform, I would suggest Notepad++ for a freeware GUI-based editor, and either Windows own system shell tools CMD or PowerShell as no-cost commandline editors.
Scott -
As usual marcorocchini doesn't specify exactly what he means. Is there only one blank line at the start and one other line -- like in your example? What if there is a space (or several) on the first line -- is that still a "blank" line? Is there always a blank line at the start? Can there be more than one blank line at the start -- and do they all need to be removed? Are there other blank lines in the file that need to be retained? Do you need to remove all blank lines?
Try sed. It can do whatever you need. Read the manual. -
I often think what our 'cat' is smoking.
A 'blank/empty' line is typically a result of a line-break.
And what does one gain by removing it ? A few bytes at best.
Live with it and worry about more important matters. -
My guess is he's using a batch file where a program produces a file with the number he needs. Then he wants to import that number into an environment variable. The number is expected on the first line, not the second. For example:
Code:ffprobe.exe -v quiet -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 -select_streams v:0 %1 >duration.txt set /p duration=<duration.txt echo duration = %duration% pause
1234
1234 -
the brain-limited cat: you have to give yourself a reason. EExactly I don't know if it works but something like:
Code:findstr /v "^$" "%cd%\NVidiaVersion.txt" > "%cd%\NVidiaVersionTemp.txt" & move /y "%cd%\NVidiaVersionTemp.txt" "%cd%\NVidiaVersion2.txt" >nul if exist "%cd%\NVidiaVersion.txt" del "%cd%\NVidiaVersion.txt" if exist "%cd%\NVidiaVersion2.txt" ren "%cd%\NVidiaVersion2.txt" "NVidiaVersion.txt"
Similar Threads
-
decrypt video using keys from txt file
By m0ck in forum Video Streaming DownloadingReplies: 13Last Post: 14th Feb 2023, 10:03 -
batch to remove blank lines in .txt
By marcorocchini in forum Newbie / General discussionsReplies: 3Last Post: 9th Aug 2022, 12:59 -
timing of subs when using plain txt file
By jkjack47 in forum SubtitleReplies: 2Last Post: 29th Jul 2020, 02:08 -
batch to remove a particular string in a .txt file
By marcorocchini in forum Newbie / General discussionsReplies: 8Last Post: 17th Oct 2019, 19:09 -
batch that change string values on a .txt file
By marcorocchini in forum Newbie / General discussionsReplies: 8Last Post: 14th Feb 2019, 20:33