Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm unable to read data from this file .. .Its a .dat file & i tried opening using notepad. But after opening I'm unable to read from it.The words are not in English . I tried changing the font ,but it didn't help. I even tried changing the format , nut still it was the same. Can anyone help me with this please ?
The file is shared over here:
https://docs.google.com/file/d/0BwISJR5GZQ88a29yTFZKTnJMYVU/edit?usp=sharing
This is not a text file; it is binary. It has the MIME type application/octet-stream.
This means you need to open it in whatever program it was created with.
You won't be able to read it, because it's not text data. Notepad will not help certainly.
Dat files are used by lots of programs and this file may be for one of those programs. I don't know why this file was shared. Maybe it was savefile of a game or setting of another program.
So in brief, you can't open it like text data and if you don't have any other information about this .DAT file, you should let it go.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a folder of around 3,000 music files of all the same type (.flac).
I made an excel (and .txt) list of around 1,000 files in that folder that I want to move to a different folder.
Is there a way to accomplish this without having to manually move each file by referencing the list?
Thank you!
First make a backup of everything!
Yes this is indeed possible, I wrote a little python script for you:
import os
f = open("whichtomove.txt", "r")
filelist = f.read().split("\n")
for x in range(0, len(filelist)):
os.rename(("fromhere/" + str(filelist[x])),("tohere/" + str(filelist[x])))
You just have to change the folder paths and I assumed the list is in this format:
file1.flac
tihs.flac
If the format in your format is another you just have to change the split operator, e.g. to ";" if you split the list entries with ';'
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm tray to save (folder address) to a text file and i want copy file to this address ,
is there any way to use copy command read this text address and copy file to the address
i want make a copy batch program for copy my file to several address in my pc but get the address from a text file , Addresses are not fixed and often change.
Like this ?
get-content text_path.txt | foreach { copy file.txt -dest $_ }
It's not quite clear, what your problem is, but this may help you:
to write something to a file use
echo this is my text>file.txt
to read it back into a variable use
set /p "var="<file.txt
Then you can use it:
echo I have read: %var%
Note: this is the simplest way to do it, but it works only with "one-line-files" - exactly, what you need (according to your description)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am very new in R Programming, my concern is about importing "Document" kind of files. I say "Document" because when I go to "Get Info" and see what type of data it is, this is what I see:
I know how to open .txt or .csv files, but how about "document" types? Without resorting to exporting this kind of file manually using Excel.
I'm using Mac OS, btw.
Thanks!
You open the file, just like any other .txt file. Simply because it lacks a proper extension name, does not change much. (now if it is not a text file, that is another issue altogether, but I would bet it is)
Try the following:
read.table("~/SMSSpamCollection", header=TRUE, sep="\t")
Change "~/" to the "ptah/to/your/file/"
Mess around with header, sep, etc.
see ?read.table for more help
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am migrating a shop over for a client.
I have to pull all the old image files off her 'shop' which has no FTP access.
It allowed me to export a list of filenames/urls. My plan was to load them up in Firefox and use "Downloadthemall" to simply download all the files. (Around 2000). However about 1 1/3 have [ and ] in.
i.e.
cdn.crapshop.com/images/image[1].jpg
Downloadthemall freaks out and only reads it as
cdn.crapshop.com/images/image
And won't download it because it isn't a file.
Anyone got any ideas of an alternative way to pull a list like this?
See this solution that explains why the example URL you provided is invalid: Validation. After you look at that post you'll see that, in the answer provided by #good, you have to encode characters that are not according to the specification using percent encoding, so the webserver will understand them.
This calls for python... see this post: Percent encoding in python
And then we can put it all together in a script, which you will use to read from stdin and output to stdout: python script.py < input > output.out.
import urllib, sys
while 1:
try:
line = sys.stdin.readline()
except KeyboardInterrupt:
break
if not line:
break
print urllib.quote(line.strip(), safe=':').strip('\'')
Then, hopefully, download them all will parse that list of files (the input to that script is supposed to be a list of url's separated by a newline) that have been corrected by the script.
You may be interested in this post as well: Downloading files with python. Which shows you how to download files (web pages in particular) using python.
Good luck!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have lots of .nii file. I want to know how to convert .nii file to .nii.gz file?
Thanks
As far as I know, there is nothing special about zipping NIfTI files. In MATLAB, you could simply do:
gzip('niftifilename.nii') % this will return niftifilename.nii.gz
gzip('*.nii') % for multiple nii files to create one .nii.gz
To work with the file again, you can unzip it, using gunzip. I've tried this on my Mac (don't know if this will work on Windows).
Typically, they are volume data, and hence take up a fair bit of disk space. Zipping it is purely for reducing the size of the file, and should not modify data.
You can simply do:
gzip({'*.nii'},outputdir)
Which will zip all your nii files into a nii.gz and place it into outputdir.
From the documentation:
To gzip all .m and .mat files in the current directory and store the
results in the directory archive, type:
gzip({'.m','.mat'},'archive')