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 7 months ago.
Improve this question
I have been looking for documentation related to interacting with MSPaint from the command line. I have only found references to /p, /pt and /wia, but no guidance as to how to use them and their limitations.
I am trying to send some graphics files to the printer and when I drop the file on my printer driver I get a different print output than if I call paint from the command line. I am using the UDC print driver to convert graphics, and I am using paint to send my graphics file to the printer driver in order for my file to convert.
Any ideas?
I know that mspaint /p filename and mspaint /pt filename both print straight to the default printer. Not sure what /wia does, maybe something to do with Windows Image Acquisition?
Also, as others have pointed out, there are many programs a lot more capable for doing what you want than MSPaint.
I actually suggest you look into doing this in Paint.Net instead. You will have much more freedom.
I suggest ImageMagick hands down... it's like having Photoshop on the command line!
Use PngOptimizer:
https://portableapps.com/apps/graphics_pictures/pngoptimizer-portable
it is freeware, doesn't require installation, and is less than 1MB. Converts nicely from BMP to PNG and many other things.
There is a specific command line version PngOptimizerCL to be downloaded from: http://psydk.org/pngoptimizer
To run in command line, converting from bmp to png:
PngOptimizerCL.exe file.bmp file.png
What OS (specific version) are you using? The newer versions of Windows support printing graphics files without the need for MS Paint or any other graphics program. It's called the "Photo Printing Wizard" in XP, and you can even just right-click on a graphics file and choose "Print" right from Explorer - no other program required (and no command line switches needed either).
If all you are trying to do is send some graphics files to the printer, and you're able to drag & drop them, then this is what I'd recommend using.
Related
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
So I recently changed jobs and I brought a bunch of files with me off my OS X 10.7 system. I had way too many files than could fit on the external drive I had, so I had tried dragging select files onto the drive, which gave me eventual repeated errors, so instead I used:
tar -zcvf whatever.tar.gz my_files
and then dragged the gzipped tarball onto the drive and that worked just fine. Now however, on my new Mavericks 10.9 system, I just tried to open a rich text file (that I'd created in Text Edit on 10.7) and I get the error:
'The document "_lab_notebook_2.rtf" could not be opened.'
I called Apple about this and they claimed that gzip was adding "the command line" to the metadata of the file (I assume the rich text file - though I could be wrong) and that metadata chunk is incompatible with Text Edit in Mavericks. They said that they have a request in with the gzip developers to address this issue (by stripping out the added metadata at some point along the way). Eventually, they say once that is updated, it will be in a new system update.
In the meantime, I'm stuck with a file that Text Edit can't open. I can open the file in other text editors, but I really would rather use Apple's Text Edit, hence this post. I tried opening a copy of the file with Rezilla and I can see the metadata in coded form, but nothing's jumping out at me as the offending data. I even tried removing each resource 1 by 1 and trying to open the file after each removal, but it still would not open.
Does anyone have any hints as to how to strip out whatever it is that gzip added? Am I even working from the correct starting point? They said that the data was added during the zip-up of the file, and I no longer have access to the original. Should I be working with the .tar.gz file or the .rtf file that was contained there-in?
Thanks,
Rob
The file you are trying to open, _lab_notebook_2.rtf might not be the file. (Are you sure it doesn't have a dot before the underscore, i.e. ._lab_notebook_2.rtf?) It may be the resource fork of the actual file, where the actual file would be named lab_notebook_2.rtf.
I don't know who you talked to at Apple, but gzip doesn't add anything to anything. It is simply a lossless compression and decompression utility. They certainly haven't contacted me about it (I am one of the gzip developers). Please look up my contact information, e.g on zlib.net, and copy that email to me. Thanks.
tar on the other hand may not be preserving all of the information that was on the original file system, or storing resource forks as ._ files, depending on what you asked it to do. It would have been better if you had used the Finder File:Compress operation, which preserves all of that information. (Or on the command line, the ditto utility with the options noted in its man page to duplicate what Finder does.)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a directory of screen shots of some software in PNG format. I found that one was edited in PhotoShop, or a similar tool. I would like to identify additional PNGs in the directory that were also edited. If the editor were careless, is there any batch tool that could be used to see if the files were opened and saved from PhotoShop, e.g. by looking at the metadata or other details?
A heuristic (purely empirical, this is not documented by Adobe, hence it can change from version to version) is to look for a iCCP chunk with the name 'Photoshop ICC profile'.
A quick and dirty oneliner (linux or mingw):
$ head -c 256 file.png | perl -e '$/=undef; print ((<> =~ /iCCPPhotoshop/)?
"photoshop" : "normal");'
Worked for me, but it's obviously not infalible. The head -c 256 takes into account that the chunk will be before the pixels data (and the palette if present), so as not to grep the entire image.
Bear also in mind that if the image was edited in Photoshop and afterwards edited by other editor or processor, the iCCP will probably not survive.
If you want to peek inside the PNG structure, there is this neat tool for Windows: http://entropymine.com/jason/tweakpng/
There is a website called image edited that is a quick and easy process.
totneschap stole my answer shakes fist
however I remember from my forensic days in uni, checking the metadata of the image is the best way, you can use the image edited website or you can use http://fotoforensics.com/,
we used to have a tool which would tell us edited version, dates of edit etc however I am struggling with the name of it, if I can remember I will edit the post, but the websites seem like the best answer.
Try FotoForensics. It will tell you if the image is edited or not.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for is a good on-screen POD reading experience.
For years, I've used perldoc or man running in an xterm to read Perl documentation on screen, and a small custom program built around Pod::LaTeX to print it. The printed version is good: the script does a nice job. However, on-screen reading is painful:
You can search, but good luck finding e.g., the as section in DBIx::Class::ResultSet. Less doesn't know anything about the structure of the document, and searches for common English words are pointless.
I fear every time the document tells me see section so-and-so. Great. Now I have to find that. And then getting back to where I was won't be trivial (though that may be my less ignorance showing)
See document so-and-so is worse. !perldoc foo works, but switching between the two documents is then hard. You can mostly get around this by suspending less and running perldoc from the shell, but that's more keystrokes and I'm lazy.
Formatting leaves a lot to be desired.
I want to be able to click a table of contents, and go to that section. I want to be able to click that "see other" and go there. And so on. So far, I know of two possibilities:
search.cpan.org, example DBIx::Class::ResultSet. Requires an Internet connection, but that's not normally a problem.
Podbrowser. Just started trying this, looks pretty nice.
I'm running Debian GNU/Linux, both Lenny and Squeeze. But please suggest programs for all platforms to make this as useful as possible.
You can try Pod::Browser which is built-in http server that you can connect to with your browser, or something like Tk::Pod which is gui pod browser.
Have you seen CPAN::Mini::Webserver or Pod::POM::Web or Apache::Perldoc? These set up a local way for you to see nice, HTML versions of your docs.
I would recomment converting all your POD to HTML using pod2html
This makes it browsable, linked and nice looking, and you can customize look&feel via css.
Just to add two more POD servers that seemed to have been missed thus far!
Pod::Server
Pod::Webserver
Have a look also at Gtk2::Ex::PodViewer that is an excellent GUI viewer based on GTK. If you are using also Windows you can find a prebuilt wrapper in Camelbox (http://code.google.com/p/camelbox/).
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
EDIT!
Sorry to change the question on everyone, but I am really just asking:
How do I create a shortcut (.LNK) file from the command line with as little outside help as possible? I really don't want to run a VBscript or to download a program to do it for me. Is it really that hard?
Thanks to everyone who provided exceptional answers when I didn't really know what I was asking yet!
The original title of this question was:
Windows equivalent of Unix ln -s for
creating shortcuts from the command
line?
The original question text of this question was:
On *nix, I can create a symbolic link
to a file very easily from the command
line using ln -s.
How do I natively create a
shortcut to a file using the Windows
XP command prompt?
Note: This is not the
approach I want to take. I want to do
it the way Windows does it. I want to
do it the right way.
Windows XP and later has the fsutil command, which can create "hardlinks" to files.
See:
MSDN: Hard Links and Junctions
JSI Tip 10153: The Windows XP FSUTIL.EXE HARDLINK CREATE command
XP doesn't have symlinks. On Vista, the command is mklink. Shortcuts are not symlinks.
This is not a native Windows call, but you should probably look into Windows Sysinternals' Junction. This is a very handy tool of good quality.
If you don't want to rely on external software, you should look at kb205524 for native ways of creating junction points.
http://www.ss64.com/nt/shortcut.html
EDIT:
Sorry I deleted that. .. but that is an old NT command ... don't know if it active on XP.
I have a file called shortcut.exe on my system. Honestly, I have no idea where I got it. :-( But a quick search came up with the following website:
http://www.optimumx.com/download/#Shortcut
Maybe that will work for you?
mklink link target
Unfortunately, this only works on Vista/Server 2008 or newer.
Actually NTFS does support symbolic links. See Wikipedia NTFS_symbolic_link
Softlinks are supported by the file system used by windows.
Though this functionality is not exposed by any standard windows tools.
There are opensource tools available that can do the trick though.
Everyone seems to be beating around this bush, but I haven't seen anyone actually come out and say it yet: NTFS supports something called "junction points", which are very similar, though slightly less useful than, symlinks. These are different than both shortcuts and hard links. I use them regularly for building different versions of our software at the same location on my system (just repoint the build directory link to a different SVN checkout). The tool I use for this is called ntfslink. That page also contains a pretty good explanation of how NTFS junction points work and which versions of Windows support which features. I use it on Win Server 2k3. The ntfslink program is a shell extension, but there are other similar utilities that work from the command line. There are also Windows API functions available to create them if you want to do it programmatically from whatever app you're developing.
I don't know if this EXACTLY answers the question, but it sure makes life easier!
Go to where the program's installed. Create a shortcut to the .EXE or startup file. Put the shortcut on the desktop so you know where it is! Then drag the shortcut to the START button (in XP). When the START menu appears, drop it ABOVE the little line (so it stays visible). Hey presto - an instantly created .LNK file with Windows doing all the work for you (yes this DOES work, I've just this second done it/worked it out when I read the question here.)
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
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the interface is still lacking.
Edited: I've been using ConEmu (http://conemu.github.io/) for quite some time now. This one is a wrapper too, since it is not really possible to replace the Windows console without rewriting the whole command interpreter. Below the line is my original answer for an earlier alternative.
Not exactly a replacement (actually, it's a prettifying wrapper) but you might try Console (http://sourceforge.net/projects/console/)
I've been using JPSoft's products a long time (starting back with 4OS2 and 4DOS), and currently use Take Command 9. It works with existing batch files, has it's own improvements on top, a tabbed interface, and filename coloring options.
Looks like their site is having some problems right now, but you can find them at: http://jpsoft.com/
I use Take Command 9.0. I have used JPSoft's products for years. It has a tabbed interface. I have Take Command start with Take Command, Powershell, and CMD.exe each in their own tab. It doesn't do syntax highlighting. Take Command is syntactically compatible with CMD.exe and enhances each command quite a bit and adds many more.
PowerShell isn't a complete replacement for CMD.exe or Take Command. I find myself using both. You might ask why I would still use CMD.exe and it is because I will use Take Command to test a batch file that is limited to commands that work in CMD.exe and I then need to deploy the batch file on a workstation/server that doesn't have Take Command on it. I can create/test in Take Command and then verify it works in CMD.exe before deploying it.
I don't know of any IDE's that provide Intellisense for batch files specifically. If they did it would only be for a few keywords anyway. Most of the time in batch files you are running commands that are external to the batch language and wouldn't be included in the Intellisense.
I use Textpad to edit my batch files. Take Command has a debugger and it has logging capabilities which makes it very easy to test your batch files.
PowerCmd is a trial-ware wrapper for cmd.exe and costs 30$
It offers:
tabs
a "normal" selection mode
copy'n'paste
highlighting
auto complete
buttons to start Python, Powershell and others
If you want a more feature-rich UI for Powershell, try PowerGUI.
http://powergui.org/index.jspa
NYAOS
"NYAOS" is the tcsh-like enhanced commandline shell for Windows and OS/2 !
http://www.nyaos.org/
For decent completion and command history, try the PyCmd wrapper at https://sourceforge.net/projects/pycmd/
I use 4NT from the above mentioned JPSoft. It works great and has great added functionality. It is being replaced by TakeCommand but I do not need that much extra functionality.
Update:
It's no longer known as 4NT. Now its name is TCC/LE.
Nick, I know you asked this a long while ago but I've just found it while searching for something related. I have been using PromptPal and its been great. I got it about a year ago, early 2008, and it was through this discount software thing called BitsDujour. I just went there and noticed they had a deal for 51% off that product only a few days ago. Keep your eyes on that site and maybe the discount will come up again soon. Its well worth the $30 but I got 2 licenses for 1/2 off, one for each of my PCs...
If you want not to use cmd.exe totally then go for ZOC.exe terminal.ZOC is enterprise application.
Else just add some feature to your Command prompt by installing GOW.EXE.GOW is opensource application.
But always you can go for Git which is giving mostly commands in bash. Just add the bin folder to your environment path. Your command prompt will work as unix terminal.