My friend pranked me by creating a batch file which opens a YouTube video and added it to the startup folder, so that the batch file launches every time I log in. This is what he wrote in the batch file:  TIMEOUT 1 start /min https://www.youtube.com/watch?v=Kob0G2hE8IY   On top of that, he scheduled the batch file to run every 10 minutes using Task Scheduler.  This is done on a Windows PC. So my question is, how do you do the same thing on a Mac?
121886
I want to automatically start my MongoDB Server at startup. The command for it is  mongod --dbpath="/Users/prateek/Desktop/Mongo Database"   How do I configure this in Mac OSX El Capitan?  Note - I have installed MongoDB using Homebrew
12107
How can I create a scheduled task to run a PHP file? Yes, I filled out everything in the scheduled task, but it still doesn't work.  Run: &quot;C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website\save.php&quot; Start in: &quot;C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website&quot;  It just opens the PHP file in Notepad. I gave the correct user name and pwd. Please help me..
49075
I'm trying to figure out exactly when I created a file. Windows 7 thinks I don't know how to subtract two times, and tells me it was created "1 hour ago." I need a little more detail than this, but I can't seem to find a setting to toggle this "feature" off.  Example below:
81691
I'm looking for ways to watch mouse and keyboard events on Windows, Linux and Mac from Python.  My application is a time tracker. I'm not looking into the event, I just record the time when it happens. If there are no events for a certain time, say 10 minutes, I assume that the user has left and stop the current project.  When the user returns (events come in again), I wait a moment (so this doesn't get triggered by the cleaning crew or your pets or an earthquake). If the events persist over a longer period of time, I assume that the user has returned and I pop up a small, inactive window where she can choose to add the time interval to "break", the current project (meeting, etc) or a different project.  I've solved the keylogger for Windows using the .  On Linux, I have found a solution but I don't like it: I can watch all device nodes in /etc/input and update a timestamp somewhere in /var or /tmp every time I see an event. There are two drawbacks: 1. I can't tell whether the event if from the user who is running the time tracker and 2. this little program needs to be run as root (not good).  On Mac, I have no idea, yet.  Questions:   Is there a better way to know whether the user is creating events than watching the event devices on Linux? Any pointers how to do that on a Mac?
75804
How do I create a system-wide autostart file?  This would be on a cloud server running the desktop version of Maverick.  I logged in as root and created an autostart file using System/Preferences/StartupApplications but it ended up in /root/.config/autostart and did not execute (as far as I can tell) upon rebooting.  The autostart file is to invoke a bash script that invokes the VNC server.    I copied the .desktop autostart file from /root/.config/autostart to /etc/xdg/autostart and rebooted.  This did not seem to make a difference.  Edit As mentioned in a comment, the objective is to run my bash script which starts the VNC server upon boot; not upon a login.
96168
I'm trying to create a batch file (to run in the background) that will copy a single file without overwriting any file in the destination with the same name, and then move the file, again not overwriting if there is a file in the destination with the same name?  I'm using this at the moment, but it is overwriting.  copy %1 dest move %1 dest
21338
I have an MacBookPro with Windows installed via BootCamp.  I copied a video off the iPhone and saved it on the windows partition.  The thumbnail of the video looks upside down.  When I play it in Windows Media Player or VLC, the video looks upside down.  When I play it in the QuickTime player (still on Windows), it looks right side up.  I then boot into MacOS.  The thumbnail looks right side up and when I play it it looks right side up.  So what is going on - which app/os is telling me the truth?  I want to make sure because I want to upload it to youTube and the file is huge, so don't feel like wasting time/bandwidth.  P.S. EDIT: Just like a couple of folks pointed out - some programs are ignoring the orientation tag.  I tried it on Windows 8 and all programs seem to respect the tag (including Windows Media Player and Movie Maker and Video applet in Metro screen). So good progress.
65948
I am trying to copy a file over from a mapped drive on a network to the current computer through a batch file.   I've already attempted the following below and still no results. The plan is to run a batch file to copy a file from a network drive down to the local C:\ drive.   @echo off copy H:\Videos\TargetVideo\TargetVideo.mp4 C:\Video\
34480
I want to write batch or something, that will write output of top into a file on login.  I did top &gt;&gt; output-file, but it contains some strange character!  Can somebody give a simple tutorial about how to write batch file in Linux?
33210
I need to create a portable windows To Go workplace for my job and make it runs on a Mac computer, i tried WinToUSB tool and it didn't work, it keeps stucking at 0% when creating Windows to Go with a USB 3.0, so, is there any other way or tools that can create a WTG drive that can be boot and run on a mac?
6471
I have the same question  this, but for macOS.  There is a GUI solution with Activity Monitor. Any command line alternative? I use latest macOS Sierra.
106298
I want to change my default media player in macOS.  (In my case, I want to change it to my own AppleScript-created instance of VLC that I exported as ‘VLC-New-Window.app’, which is scripted to  so that it doesn’t override the existing paused playlist or video file I want to keep in the background.)  It is very tedious to find an example of every file type I use VLC for (whether mkv, avi, mp4, m4v, m4a, m4b, mp3, flac, or m2ts), right-click on it, and manually set the new default program each time.  And honestly I’d like every audio or video file type that VLC can open to be applied here so that I never have to worry about this again.  Is there any method that can help automate this, or do this in batch?
79329
Here’s something that sucks:   Plug in external monitor to laptop (Mac OS X Leopard in my case). Arrange your windows to have the IDE on one screen and browser on another. (Etc etc.  Resize, rearrange, fuss, fuss, fuss.) Unplug monitor to run to a meeting, or whatever. Goto 1.   I’d like to replace step 2 with “computer remembers exactly how I had it and just puts it back that way”.  (I personally only need a solution for Mac but collecting solutions for other systems here might be useful to others.  I’m sure it’s a common problem.)
35876
I'm searching for an automatic time tracking tool for Mac OS X. I regularly mess up manual time tracking with timers etc., so I want something more automatic:  The application should run in background and track more or less everything I do - which applications are active, which sites I browse, how long I'm idle etc.  It would then list all the things I do in a timeline and let me specify filters like "Xcode in foreground", "browsing developer.apple.com", etc. Using these filters, I could check how long I worked on what after I left work.  Is there an application which does this? I'm aware of a website and a client for it, but I'm absolutely NOT comfortable with putting all the things I do on some random website.
92767
Is there a good place or bash script I can use (or at least a version I can build myself) for FFmpeg on OS X?  I have Xcode installed as well as the CLI for Xcode (gcc etc).  I have a version of FFmpeg currently installed, but somehow I get a segmentation error on libx264 as well as the libvpx (I can't convert to MP4 and WebM).  All I want to do is batch convert video files to HTML5 compatible videos. All my source videos consist of .mov .mp4 and .wmv files. .ogv works fine by the way.  So the real question:   How to uninstall everything of FFmpeg on my Mac now Reinstall a FFmpeg version that can convert to .mp4, .webm, and .ogv   I also tried the precompiled version of Miro video converter but somehow that doesn't work either.
54495
We are trying to have a simple drive mapping script start up for ALL users on a Mac Mini. What's the simplest way of going by doing this? I've tried creating a .plist in Lingon and adding it to the Library LauncherDaemons and LauncherAgents folders, but it's not starting up. Any ideas? Is there a way to do this in the Terminal? The script by itself works fine and works if we add it to the Startup Items in System Preferences, but we want this to be automatic and for all users.  Thanks.
75780
Here is the situation:  I have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states.  Fortunately, it allows you to create custom actions in Java which can be called at any time during the installation process (by way of what I consider to be a rather convoluted API).    I just need something that will tell me if a specific service is started or stopped.  The IDE also allows calling batch scripts, so this is an option as well, although once the script is run, there is almost no way to verify that it succeeded, so I'm trying to avoid that.  Any suggestions or criticisms are welcome.