Wikipedia:Reference desk/Archives/Computing/2007 January 7
Computing desk | ||
---|---|---|
< January 6 | << Dec | January | Feb >> | January 8 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
January 7
[edit]Bulk renaming of files
[edit]I have N jpg files. I want to arrange these alphabetically and then rename them so that the first file is 1.jpg, second is 2.jpg, etc., so that the last is N.jpg. Is there a simple way to do this ? deeptrivia (talk) 01:58, 7 January 2007 (UTC)
- That would require some sort of script or software, I believe. If you email me your address I could send it to you, if you really, really need it (it's no bother, it would only take a couple of minutes to write). Oskar 02:08, 7 January 2007 (UTC)
- I'm not sure if this will solve your specific problem, but I've used a freeware utility called Bulk Rename Utility. It has a somewhat technical interface, but you may be able to get it to work. --Uthbrian (talk) 03:58, 7 January 2007 (UTC)
- I've done this a time or two. Option 1 is to write a Perl script or something (I've done that, but they've all been one-off sort of programs. It is absolutely unusable without rewriting to the specific situation.) Option 2 is this: (I'm assuming you are using Windows, here.) Using the command line, output the filenames to a text file(command is "dir -b > file.txt"). Open this file in your favorite spreadsheet program (I'm using Excel). You can use it to automatically create a batch file like this: Fill column 1 with "rename", put the original file names in column 2, and use this formula =CONCATENATE(TEXT(ROW(), "0"), ".jpg") to create the renamed files in the third column. You can change the number of zeros to give you leading zeros(i.e. change "0" to "00" if you want a zero in front of 01.jpg through 09.jpg). Save the file as a tab delimited text file, change the extension to .bat, and run it in the directory the files are in. Option 3 is doing it one. file. at. a. time. --Transfinite 06:39, 7 January 2007 (UTC)
- If you use Linux, or if have Cygwin installed on MS Windows, then you can go to the directory you want, and copy-and-paste the following bash command:
N=1; mkdir "out"; for A in *.jpg; do \ echo "Renaming $A to $N.jpg"; \ cp "$A" "out/$N.jpg"; \ N=$(( $N+1 )); \ done;
- Note: the sort is case sensitive - for case insensitive search use
rename y/A-Z/a-z/ *
- to lowercase everything first (that command will lowercase non-jpg files too!!). From the command above, files are copied to "out" with the new names (not renamed). Nonetheless, please create a backup copy of the files before using this. For renaming as 01.jpg, 02.jpg, etc replace "out/$N.jpg" with "out/$(printf %02d $N).jpg" (or 001 as %03d, etc). --h2g2bob 11:42, 7 January 2007 (UTC)
- Batching renaming in IrfanView will get the job done quickly. Robmods 12:45, 7 January 2007 (UTC)
- Total Commander also has a batch renaming tool included. Aetherfukz 17:59, 7 January 2007 (UTC)
- An elegant pipeline (may require bash):
paste <(ls *.jpg) <(seq 1 $(ls *.jpg | wc -l) | sed 's/$/.jpg/') | xargs -l1 mv
- An all-sed pipeline:
ls *.jpg | sed = | sed -n 'h;n;G;s/\n\(.*\)/ \1.jpg/;p' | xargs -l1 mv
- Any improvements? –EdC 23:04, 7 January 2007 (UTC)
- Well, he did contact me via email, and I wrote a little java application (I use Linux too, and that whole "platform-independent" thing is really neat) that fixed it for him. I'm sorry to be the boring guy using Java when you can solve it with wierd Linux pipelines :) Oskar 23:14, 7 January 2007 (UTC)
- That's beauty, man! --frothT C 04:08, 8 January 2007 (UTC)
- Well, he did contact me via email, and I wrote a little java application (I use Linux too, and that whole "platform-independent" thing is really neat) that fixed it for him. I'm sorry to be the boring guy using Java when you can solve it with wierd Linux pipelines :) Oskar 23:14, 7 January 2007 (UTC)
Mainframe
[edit]Why are mainframe computers called "mainframe" computers? —The preceding unsigned comment was added by The Anonymous One (talk • contribs) 03:24, 7 January 2007 (UTC).
Did you try the article on Mainframe computers? --Transfinite 05:58, 7 January 2007 (UTC)
- Well, it combines "main", meaning primary, with "frame", meaning a structure to which various components could be attached. So, it was the primary structural frame to which processors, disk drives, etc., were attached. Tape drives and other peripherals were often attached to secondary structural frames. StuRat 21:07, 7 January 2007 (UTC)
Neverwinter nights 2 questions
[edit]Its possible to make new classes for neverwinter nights 2? And new prestige clases? And new races? And new sub-races? Exdeathbr 03:55, 7 January 2007 (UTC)
- I'm not exactly sure what you're asking (classes that didn't appear in Neverwinter Nights 1? Or making up your own classes and races?), but have you tried looking here? In particular, there's a "character development FAQ" that might answer your question. Dave6 02:59, 8 January 2007 (UTC)
Yes, i was talking about create my own classes, races, sub-races, or restige classes, with the toolset or another thing. Exdeathbr 22:26, 8 January 2007 (UTC)
I'm not an IT professional, but I ran across the article on disk staging while reading about backup. The article on disk staging seems to be about disk cloning instead. Is my interpretation correct? --Uthbrian (talk) 03:53, 7 January 2007 (UTC)
A Google search seems to suggest that the idea with disk staging is outputing backup data to a hard drive before pushing it out to tape. I'm reverting it back to an old copy that says that. --Transfinite 06:57, 7 January 2007 (UTC)
- A common way to do backups in "highly available" systems is to have each disk volume replicated ("shadowed") across (say) three physical disk drives. For backup purposes, one of the disk drives is removed from the volume set and the contents of that removed disk is then backed-up to tape (etc.). This third disk is then re-joined to the volume set and its (now obsolete) data is "caught-up" to the current contents of the volume set.
Database conversions
[edit]I was wondering, as I am not too greatly trained with computers, if there was a way to take a database list (it has over 350 items, so I don't feel like converting manually) and convert into a text file with added markings in between. Example: Take the following "database":
Field 1 | Field 2 |
---|---|
Row 1 info 1 | Row 1 info 2 |
Row 2 info 1 | Row 2 info 2 |
and convert to a text file similar to this:
[[Row 1 info 1]] by [[Row 1 info 2]] [[Row 2 info 1]] by [[Row 2 info 2]]
Maybe some program that would create a list by: [[<<Field 1>>]] by [[<<Field 2>>]] (replacing <<Field #>> with each row in the database). If this is possible, what program/application could I use to do this? --WillMak050389 04:53, 7 January 2007 (UTC)
- This can be done with just about any program, scripting language, or even a single database query. Because there are literally millions of ways (if not billions of ways) to do it, you need to be more specific about what kind of database you have and what programming languages you know. --Kainaw (talk) 04:57, 7 January 2007 (UTC)
- I have Microsoft Database from Microsoft Works version 8.0. I meant to specify that before. Anyway, I hope that helps. --WillMak050389 05:01, 7 January 2007 (UTC)
- In a SQL query you could use:
SELECT "[[" & [Field1] & "]] by [[" & [Field2] & "]]" AS Expr1 FROM Table1;
and then just export the query results as a text file. (I would assume Microsoft Database has the functionality to create a SQL query.) --Phydaux 14:35, 7 January 2007 (UTC)
- In a SQL query you could use:
My Recent Documents (Windows XP Start Menu)
[edit]In the “Customize Start Menu” dialog box I have checked “List my most recently opened documents”. My complaint is that they get listed in alphabetical order, but I would like to see them listed in order of recency. --Citefixer1965 05:30, 7 January 2007 (UTC)
- Try clicking on the column heading for time created. Typically clicking again on the same column heading will reverse the order. StuRat 20:52, 7 January 2007 (UTC)
- I think sturat is suggesting that you open "recent documents" in windows explorer (right click it and select Open) and then sort the entries by date by the method he suggested --frothT C 04:06, 8 January 2007 (UTC)
- Tried that; changing the order in which the files in the window are displayed makes no difference to the order in which they are displayed in the pop-out menu from the Start Menu. --Citefixer1965 04:25, 8 January 2007 (UTC)
- Incidentally the Microsoft Knowledge Base article on My Recent Documents does not address my question. I find it peculiar that this does not come up more often; surely almost everyone that uses the ‘My Recent Documents’ would find it more convenient for the most recent documents to be listed first? --Citefixer1965 04:37, 8 January 2007 (UTC)
any way to make windows xp sound recorder record longer?
[edit]hi, just found this utility it works ok but seems to be set at 8 seconds. is it posible to set it for 1 hour etc?
Before recording what you want, record 10 seconds and keep making the sound slower, this will make the lenght of the sound bigger and you will have more time to record.
- Just use Audacity --h2g2bob 13:36, 7 January 2007 (UTC)
- Audacity is definitely the best option, but if for some reason you still want or need to use sound recorder, microsoft has a support page that shows you how to increase the recording time. it lists 95/98 but should work on xp.--PiTHON 05:06, 8 January 2007 (UTC)
problem downloading from camera
[edit]i use a Canon A75 and over a period was able to download photos from the camera to photo files with no problem. now when attempting to download, a notice appears reading 'unable to locate scanner or camera' the scanner however does work but allattempts to open the camera connection and download pictures fails.
all help will be appreciated217.132.93.151 15:07, 7 January 2007 (UTC)
- Are you sure you've plugged the camera in correctly, turned it on and that it has had a chance to be recognised? —Vanderdecken∴ ∫ξφ 16:24, 7 January 2007 (UTC)
Did you install any software on the computer to enable the upload ? There is most likely a disk that came with the camera, and you need to reinstall that software. StuRat 20:43, 7 January 2007 (UTC)
- Also try removing the driver if it exists. WP 10:32, 8 January 2007 (UTC)
Removing traces of another OS
[edit]I installed the test trial of Windows Vista a while back and decided to switch back to XP. Easy enough. Every time I turn my computer on now, though, it gives me options to boot XP and Vista. I know that there are no Vista startup files on my computer (and this is evident when I try to boot Vista, and it just goes to a black screen). I think it is because I "sectored" (for lack of the proper word) my hard drive to accept a different OS. But now I want it gone. How can I remove these last traces of Vista on my computer (safely!)? → JARED (t) 18:13, 7 January 2007 (UTC)
- If I understand you correctly, you created a new hard disk partition and then partially installed Windows Vista in the new partition. If this is the case, try formatting the Windows Vista partition, which will delete everything on that partition. StuRat 20:30, 7 January 2007 (UTC)
- The program that's offering the boot choices is called a boot loader; what you want is probably to re-install the single-OS boot loader that comes with XP rather than the multiple-option one you're using. (It's possible, though, that a simpler reconfiguration of the loader you have would cause it to invisibly load the one option it knows about so that it wouldn't matter.) As for how to do any of this, I'm afraid my only suggestion is to look at the NTLDR article and its links. --Tardis 01:20, 8 January 2007 (UTC)
- It's in your
boot.ini
file, which is marked system, hidden, and read-only. You have to open up a command prompt, and typeattrib -r -s -h C:\boot.ini
. Back upboot.ini
just in case you stuff up. Openboot.ini
in Notepad and remove the line under[operating systems]
that saysmulti(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows Vista"
or something similar (I haven't/don't/will not use Windows Vista). That's about it (of course the default OS could be set to the Vista partition, if you created one). Sorry if my advice is too hard to understand. --wj32 talk | contribs 06:46, 8 January 2007 (UTC)- That was very simple! I'll reboot to see how it goes. → JARED (t) 23:09, 8 January 2007 (UTC)
- And we never heard from him again! Oskar 23:35, 8 January 2007 (UTC)
- Because of failing to start Windows because it found that "boot.ini was corrupted"! --wj32 talk | contribs 00:18, 9 January 2007 (UTC)
- And we never heard from him again! Oskar 23:35, 8 January 2007 (UTC)
- That was very simple! I'll reboot to see how it goes. → JARED (t) 23:09, 8 January 2007 (UTC)
.avi to dvd
[edit]how can I burn an .avi movie file onto a dvd so that I can play it on my dvd player, or playstation. I am in the UK if region makes a diffference. If i recquire software can I have some recomendations, and freeware if possible. Thank you. Philc TECI 18:30, 7 January 2007 (UTC)
- Here's one fact that might help you: the last three characters of the file's name tell you nothing about its contents. Even if you know the file is in Audio Video Interleave format, that tells you nothing about the actual audio and video data. First, you need to find out what kind of audio and video you're dealing with. The file command is good for this, or the online version if your OS doesn't have it. —Keenan Pepper 19:08, 7 January 2007 (UTC)
- VLC Wiki has some information, but not all that much. I'd suggest finding a specialised program (try sourceforge). --h2g2bob 19:26, 7 January 2007 (UTC)
- He's right- AVI isn't a video format (although it's often synonymous with uncompressed "full frame" video) it's a container format. A good way to find out what form of encoding it uses, try playing it in VLC player and viewing the video stream information- the decoder listed can often give you a hint as to what format the movie is. But this whole format thing is probably irrelevant, chances are your dvd burning software will take it just fine. To make a video DVD you need software like Nero.. chances are if you bought a mainstream DVD burner then it came with this software. Just point your burning software at the video and hope it can decode it (for re-encoding in MPEG-2). If it doesn't recognize the format, try using a utility like mencoder to encode it in a different format --frothT C 03:53, 8 January 2007 (UTC)
- Arent there any programs that will let brun it onto a dvd though, do I have to know what format it is? Philc TECI 12:49, 8 January 2007 (UTC)
- I've used a program called Roxio Toast for this with good results, but it's not freeware and it's only for the Mac. It looks like Roxio make similar software for Windows, though - have a look at their website. --Richardrj talk email 13:56, 8 January 2007 (UTC)
- Arent there any programs that will let brun it onto a dvd though, do I have to know what format it is? Philc TECI 12:49, 8 January 2007 (UTC)
Calculator Progamming
[edit]How would i program my calculator to run a program i have developed, to operate on the individual elements of a variable sized matrix, while leaving it in matrix form?
Is this even possible?
Thanks Omnipotence407 19:28, 7 January 2007 (UTC)
- What model calc do you have ? StuRat 20:25, 7 January 2007 (UTC)
Ti-84+ Omnipotence407 20:54, 7 January 2007 (UTC)
- So, the equivalent of saying something like for(R,0,matrix row length)? As far as I know, you can't do this, although I may be wrong. TK-925 03:21, 8 January 2007 (UTC)
- Sure. Your matrices are named [A] through [J]. To access an individual element, use [A](X,Y) where X and Y are the "coordinates" of the element you want. So here's some random example code..
Input "HOW BIG X? ",X Input "HOW BIG Y? ",Y Fill([A],5) Pause [A] For(A,0,X-1,1) For(B,0,Y-1,1) 1 -> [A](A,B) End End Pause [A]
- This will ask you how big you want your matrix A. It then uses the built-in TI-OS "fill" operation to fill that matrix with fives. Then it's printed out with the Pause command. (I'm not exactly sure if Pause works with matrices, you might also try Disp) Then it manually steps through each cell and fills it with ones (the -> means the STO> symbol) and prints out the matrix again. --frothT C 04:02, 8 January 2007 (UTC)
- You forgot to dimension the matrix. Add:
{Y,X}->dim([A])
- before the Fill command. Superm401 - Talk 05:42, 8 January 2007 (UTC)
- Also, the fill commands backwards, switched X and Y, and TI-BASIC at least doesn't use 0 indexing. That's still better than I usually do without testing. :) The full program should be:
Input "HOW BIG X? ",X Input "HOW BIG Y? ",Y {Y,X}->dim([A]) Fill(5,[A]) Pause [A] For(A,1,X,1) For(B,1,Y,1) 1 -> [A](B,A) End End Pause [A]
- Superm401 - Talk 05:54, 8 January 2007 (UTC)
- Without testing indeed, and also I haven't programmed in TI BASIC in almost a year. It took me at least 10 minutes to decide that it was [A](X,Y) and not [A][X,Y] because I didn't want to get up and actually check :D Good catch with the dim. But for the X and Y, I don't even try to keep them straight, it makes more sense to me to always have X and Y in order (X,Y) than X actually being the horizontal axis and Y actually being the vertical --frothT C 07:50, 8 January 2007 (UTC)
- It doesn't really matter unless you're going to be displaying the matrix. Superm401 - Talk 08:39, 8 January 2007 (UTC)
- Without testing indeed, and also I haven't programmed in TI BASIC in almost a year. It took me at least 10 minutes to decide that it was [A](X,Y) and not [A][X,Y] because I didn't want to get up and actually check :D Good catch with the dim. But for the X and Y, I don't even try to keep them straight, it makes more sense to me to always have X and Y in order (X,Y) than X actually being the horizontal axis and Y actually being the vertical --frothT C 07:50, 8 January 2007 (UTC)
- Superm401 - Talk 05:54, 8 January 2007 (UTC)
I'm afraid I'm not following this. To be more exact, i want to be able to mod26 each element, i have the the program that allows me to do that manually, but i want to be able to do that to each element of the matrix individually. For the sake of writing, can you please put a mod26 or something where that program would go? Thanks Omnipotence407 00:28, 9 January 2007 (UTC)
- That's understandable. The part that loops is below:
For(A,1,X,1) For(B,1,Y,1) 1 -> [A](B,A) End End
- Assuming [A] contains only non-negative values, mod26 should work just like:
For(A,1,X,1) For(B,1,Y,1) [A](B,A)->C C-int(C/26)*26->[A](B,A) End End
Thanks everyone, i was able to figure it out. Omnipotence407 17:41, 14 January 2007 (UTC)
Electronic attendance counter
[edit]Attendance counter: you've seen one, those little metal things that fit in your palm with the little black dials with white numbers on them. I've been looking for the electronic equivalent of one of these, so I can get a yyyy-mm-dd-hh-mm-ss timestamp along with each count, and then upload the results to a spreadsheet. This seems like an obvious invention or product (to me), but I cannot find one. Anyone? NoClutter 22:27, 7 January 2007 (UTC)
- Sports timing equipment might do what you want (an electric chronometer, like this: [1]) They typically have a display and space for a couple thousand timestamps, so probably won't fit in your palm, though. –EdC 22:35, 7 January 2007 (UTC)
- Write a program that writes a record (with your desired data) each time you click the mouse. Use the mouse as your hand-held attendence counter.