Move recently added desktop files to a directory - vbscript

I'm trying to create a batch file script which helps me transferring the new files from desktop to a directory whenever I'm accesing it. I'm working with graphics and I create/save a lot of new elements on the desktop.
Thank you!

Related

I'm looking to have a Folder recognise new files being saved into it and then copy new files into a collated folder

In MacOS i want a folder action to trigger when i place a new file into a subfolder. The action should grab a newly added file to the folder and copy it to another folder where all the latest files are collated and can be viewed together. I also want the script to delete any old version of the same file it copies across to the collated folder. The trouble is the file names are slightly dfferent as they have a version number in them. The version number is defined as "v01a" to start with but can change to "v01b" or "v01e" or "v02a" or "v03c".
So if a file called "1234_ProjectName_Image01_COMP_v01a.jpg" already exists and a new file called "1234_ProjectName_Image01_COMP_v01b.jpg" is added the the file called "1234_ProjectName_Image01_COMP_v01a.jpg" needs to be deleted from the destination folder.
I've tried a few times to get started in automator but never really get the pieces in place for it to be useful.
(SOURCE)
Dailies/_Internal
Dailies/_Internal/Image01/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Internal/Image02/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Internal/Image03/1234_ProjectName_Image03_COMP_v01a.jpg
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
If a new file is added called
Dailies/_Internal/Image01/1234_ProjectName_Image01_COMP_v02a.jpg
then this file is copied from its source folder and put into the Destination folder.
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image01_COMP_v02a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
Here there is already an image with the same name except the version number so the script should also delete the old file leaving me with.
(DESTINATION)
Dailies/_Latest
Dailies/_Latest/1234_ProjectName_Image01_COMP_v02a.jpg
Dailies/_Latest/1234_ProjectName_Image02_COMP_v01a.jpg
Dailies/_Latest/1234_ProjectName_Image03_COMP_v01a.jpg
I can't for the life of me figure out how to do this, any ideas would be greatly appreciated.
Screengrab of my very basic automator here

using shutil.move() I accidentally renamed my desktop folder to cat.jpg

while messing around with shutil and os modules(working on a tutorial exercise). I accidentally moved my desktop folder to an image format type called cat.jpg which doesn't exist anymore, I wasn't trying to move but I was trying to rename the image using shutil.move() when I forgot to type the image's name after its path .I actually managed to fix it after about an hour of googling I recreated a folder and named it desktop then I restored it using previous versions.However, my question is where did the image(cat.jpg) and the original desktop folder go? I searched the whole computer without finding it. here's my code:
shutil.move("c:\\users\\nate\\desktop","cat.jpg")
which output:
'cat.jpg'
I found the desktop folder in the Python folder and its named desktop.jpg but it's still an actual folder containing all the file that I had .However, when I tried to delete it, I got a message saying that the file is shared in the name cat.jpg and asking me to be sure .so anyways just wanted to tell that so anybody facing the same problem will know where to look and what to do .

moving files and folders with AppleScript

I am working on a script that will move the entire contents of a folder, including all subfolders and the files within, to another folder when I mount my bak drive.
Just for testing I wrote a simple script to check how I can do this (I don't really know AppleScript, so it's learn as I go), I used the following cmd in my applescript:
move every file of entire contents of folder "Lion:Users:dbooster:desktop:outbox" to "Lion:Users:booster:desktop:file"
So my test, as you can see is moving everything within a folder on my desktop called "outbox" into a folder called "file" on my desktop.
At first I thought it worked perfectly, but then I tried to put another folder within "outbox". What I discovered is this script moves all the files within that subfolder in "outbox", but it doesn't move the subfolder itself.
That is to say, if I test with outbox/stuff/file1.txt and run the script, the result is file/file1.txt, NOT file/stuff/file1.txt which is what I would expect.
Uhm... This seems like it should be easier than I am finding it. But I've been searching google for the past hour and can't come up with anything (maybe I'm searching for the wrong thing?) Any help would be appreciated -- thanks in advance.
Try:
tell application "Finder" to move entire contents of folder "Lion:Users:dbooster:desktop:outbox" to folder "Lion:Users:booster:desktop:file"

How to share a folder in dropbox without placing it in the dropbox folder?

I'm trying to share a folder in my machine that is not inside the dropbox folder.
On my Mac i did that using symbolic links:
cd ˜/Dropbox
ln -s {folder i want to share} {link name}
It really works very well, but I'm trying to do the same on a Windows PC.
Does anyone know how to do that?
Just creating a plain shortcut does not work.
I also tried to create a symbolic link using "mklink /D" and it did not work either. :-(
Also tried Sysinternals Junction and no success.
Thanks,
Ecil
PS: Junction creates a folder inside Dropbox folder with the same contents as the linked folder and synchronizes to other devices, but as soon as I make an update to any of the files in the linked folder (or add a new one) it does not reflect these changes to other devices/computers.

How to move multiple files when moving only one file

If you've ever saved a a full webpage you'll notice that it creates the .htm file and a folder that contains all the icons and scripts for the page.
If you move the .htm file to a new location, the folder that came with it moves to the same location, and the behavior is the same if you move the folder, the .htm file will move with it.
How can I do that with any old file/folder combination? Can this be manipulated?
EDIT: Programmatically (through CMD)
Is there a command that binds files to other files etc.?
This is a feature of the shell called Connected Files. It is specifically implemented for web pages; it is not generic or extensible as far as I know.
It doesn't even seem that useful to me as it only works when using the shell mechanisms (SHFileOperation and friends); if plain old CopyFile/MoveFile are used then all the files need to be handled individually.

Resources