|08 Jun 2012||#1|
| || |
Possible to create "file rules" similar to email rules
Ive been searching around for a way to get files to copy themselves from a certain folder into another one IF they're below a certain size. I was wondering if anyone knows of a program or script that I can schedule to do this for me.
Basically heres the problem: When I download work it goes to the downloads folder where I want it. I use dropbox and sometime I save work into the downloads folder assuming its in the dropbox folder and will sync to the cloud, only when I open my work computer I realise that the file is not present. I want to know if i can set files below a certain size (say 50MB, so I dont get huge downloaded videos and apps syncing) to copy into a temporary location in my dropbox folder as soon as they are saved or changed.
|My System Specs|
|08 Jun 2012||#2|
| || |
Moving files based on size and moving files based on changes to them are very different problems, the former being the easiest to solve. You can write a batch file to run every x amount of time (via task scheduler) that will scan the directory and copy files if they are smaller than a certain size. You might create a file called "size.bat" within the same directory
@echo off cls setlocal set maxsize=52428800 FOR /F "usebackq delims=" %%A in (`dir /a-d-h /b`) do ( set size=%%~zA if %size% LSS %maxsize% ( copy "%%A" "C:\Dropbox" ) )
You can then use Task Scheduler to set up this batch file to run at whatever interval you'd like to transfer the files.
The latter issue of copying files based on changes is a much more involved issue that I don't currently have the time to address, but it's doable with the same concepts and coding I've shown you here.
|My System Specs|
|Similar help and support threads for2: Possible to create "file rules" similar to email rules|
|Home Computer System Imaging for Newbies - My "Rules"||Backup and Restore|
|AppLocker - I am unable to create file hash rules! What gives?||Software|
|Cannot create rules in Hotmail||Browsers & Mail|
|Outlook Rules and new Email address||Microsoft Office|
|AppLocker - Create New Rules||Tutorials|
|Call Station "dialing rules"||Software|
|Our Sites ||Site Links ||About Us ||Find Us |
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
All times are GMT -5. The time now is 03:40 AM.