Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a backup of some .job files (i.e, scheduled tasks) from my old computer. I see that windows 7 does not support job files instead they accept xml files. So, i would like to know if there is a way to convert job files to xml files and import them into windows 7 machine?

Thanks.

share|improve this question

3 Answers 3

If you still have access to a PC with XP on it, you can import the .JOB files (if they're not already present in Task Scheduler) and try the following command from an elevated command prompt in Win7:

schtasks /query /s remote_computer_name /u remote_user_name /p remote_password /xml > output_file.xml

If no physical XP machine is available perhaps a VM might also work, but I'm not entirely sure.

Sources: 1, 2

share|improve this answer

If your machines are not on the same domain or cant otherwise communicate, using the /S switch wont work so you need an alternative. Although the above answer that describes the manual process worked for me as well, I wanted an easier way to do it and came up with this: http://briandunnington.github.io/migrate-scheduled-jobs.html

Essentially, you copy your .job files to c:\windows\tasks, then run the script (providing a username/password) and your jobs are automatically converted - no messing with copying old dlls, creating batch script, renaming things, etc.

share|improve this answer

This process requires that you can get to information on your XP machine, because you will need all of the .job files. But it will take all of your .job files and create the .xml and the associated scheduled tasks. A co-worker came up with the files and general process for me when I upgraded systems and had 260 .job files to transfer and I wrote it up to try to be able to help others in my same position. It's a little long, but it works, and that's all that matters. Hope it helps!

  1. From XP machine, copy the schedsvc.dll and schtasks.exe files from C:\WINDOWS\system32\ onto a USB drive. a. If you can’t find the files on your XP machine, you can check here http://www.whatisdll.com/schedsvc-dll-repair-free-download-windows-78xpvista/ and here http://www.whatisdll.com/schtasks-exe-repair-free-download-windows-78xpvista/ for help.
  2. From XP Machine, go to folder where .job files are stored (most likely C:\Windows\Tasks) and copy all .job files onto USB drive.
  3. Create a folder on Vista/Win 7 Machine on your desk top for this process. Ex. C:\Users\username\Desktop\SchedTasks
  4. Move .job files, .dll, and .exe files into the new folder on the Vista/Win 7 machine.
  5. Open C:\WINDOWS\Tasks and copy all of the .job files into that folder as well.
  6. Open a new notepad document and enter the following, without the quotation marks “dir /B >> dir.txt”
  7. Save the text document the folder created on the desktop with the file name GetFiles
  8. Change the .txt extension on the file to .bat and click Yes on the pop-up that asks if you are sure you want to change the extension.
  9. Check to make sure that in the new folder you created on the desktop of the Vista/Win 7 machine you now have the following files: a. All of the .job files from your XP machine b. GetFiles.bat c. schedsvc.dll d. schtasks.exe
  10. Double click on the GetFiles.bat.
  11. A new file will appear called dir.txt Note --> It might appear as the very first file in the folder .
  12. Open the dir.txt file. It will contain all of the names of the files in the folder.
  13. Remove the file names for GetFiles.bat, schdsvc.dll, and schtasks.exe so you are left with only the .job file names.
  14. Open a new Excel spreadsheet.
  15. Type the following in the noted columns: a. Column A - schtasks b. Column B – /change c. Column C – /TN d. Column E – /RU e. Column F – your username f. Column G – /RP g. Column H – your password, if you have one
  16. Copy the file names that are in the dir.txt file and paste them into Column D. (keep in mind that 'spaces' are not allowed in DOS, so replace them for '_ underscores'. You need to change the job names as well)
  17. Copy down the other columns filled in on step 13 to match the number of file names listed.
  18. Press CTRL+H. In “Find What” enter .job, leave “Replace With” blank, and click “Replace All”.
  19. Click on File --> Save As and save the spreadsheet to a Text (MS-DOS) (*.txt) file to the folder you created with whatever file name you’d like Ex: Taskcmd. Click OK and Yes on the two pop-ups that will ask if you are sure you want to save the file to that format.
  20. Close the spreadsheet (you can save it if you’d like, but it’s not used again), but it will have to be closed for the next steps.
  21. Open the .txt file just created and make sure that none of the file names have the .job after them. Remove them if so (you can use the same CTRL+H method). Close the file when you are certain that all of the file names do not have the .job (remember to save the file if you had to make any changes).
  22. Change the .txt extension to a .bat and click Yes when it asks if you are sure.
  23. Click on the Start Menu and type cmd into the search bar, open the Command Prompt.
  24. Type the path to the file in the folder on your desktop. Using the example above, this would be (without the quotes) “ cd C:\Users\username\Desktop\SchedTasks” and press enter.
  25. In the new prompt type the name of the file created in step 18, including the extension. Using the example above, this would be (without the quotes) “Taskcmd.bat” and press enter.
  26. You should now see all of the files being processed with a note of “SUCCESS” after each one.
  27. Once the batch has completed, you will be able to open the Task Scheduler, click on Task Scheduler Library, and see all of your new tasks, ready to run, in center pane.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.