![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | watch folder and rotate and move Jpg files Hey Scripting People, I need to (1) monitor a folder (Named C1E) for new jpeg files, (2) then rotate the new files 90 degrees and then (3) move them to another folder (Named C2E) I have a Batch File (SEE BELOW) that will do this using a shareware program called IrfanView… but it is very resource tapping… it takes up 24% of my Microprocessor! So, I am looking into Scripts. @echo off IF "%WD_FILE_E%" NEQ "JPG" ( IF "%WD_FILE_E%" NEQ "JPEG" GOTO :EOF ) SET IMADIR=C:\Program Files\irfanview "%IMADIR%\i_view32.exe" "C:\C1E\*.jpg" /jpg_rotate="(3,0,0,0,0,0,0,0)" move "c:\C1E\*.jpg" "c:\C2E" IF %ERRORLEVEL% NEQ 0 GOTO :EOF I have modified the script below to successfully monitor the folder for new files, but I don’t know the best way to rotate and move the images.. strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE " _ & "Targetinstance ISA 'CIM_DirectoryContainsFile' and " _ & "TargetInstance.GroupComponent= " _ & "'Win32_Directory.Name=""c:\\\\C1E""'") Do Set objLatestEvent = colMonitoredEvents.NextEvent Wscript.Echo objLatestEvent.TargetInstance.PartComponent Loop Questions... 1) Is it possible to write a script to change the file attributes of the jpegs to rotate them? 2) Or must I use 3rd party software? If so, how do I call i_view32.exe" "C:\C1E\*.jpg" /jpg_rotate="(3,0,0,0,0,0,0,0)" from a script. 3) How do I move the files from folder C1E to folder C2E after rotating? 4) Is it possible to invisibly do all of this? 5) Can I have a new pony for Christmas too? THANKS, Dwayne |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Move Offline Files folder | Vista General | |||
| Impossible to solve? (was Move Offline Files folder) | Vista networking & sharing | |||
| move directories and files that exist in a sub folder - problem | VB Script | |||
| Move Folder/Files bug | Vista General | |||
| Cannot move files to public folder | Vista networking & sharing | |||