swapped
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 1/16/2012
-
Status: offline
|
vbs to rename/copy/organize files + context menu
Monday, January 16, 2012 11:25 AM
( permalink)
Hello, I would like to do the following in a vbs (any help is appreciated): 1) have the execution of this vbs be from context menu (right click menu) on select file types 2) upon execution do the following to file i clicked on, copy into current folder\archive with a datetime code appended to file name (ex. c:\newfile.txt -> c:\archive\newfile_20120116.txt) 3) confirm that the file got copied and then popup that file was copied, and upon clicking yes open the file with the default program that handles the file I think i can handle the copy with append, but i dont know about context menu and some of the confirm etc.... Anyone wanna take a crack at it or give me some pointers? Thank you.
|
|
|
|
59cobalt
-
Total Posts
:
981
- Scores: 91
-
Reward points
:
0
- Joined: 7/17/2011
-
Status: offline
|
Re:vbs to rename/copy/organize files + context menu
Tuesday, January 17, 2012 9:48 AM
( permalink)
swapped 1) have the execution of this vbs be from context menu (right click menu) on select file types See this post for a description of the general concept. swapped 2) upon execution do the following to file i clicked on, copy into current folder\archive with a datetime code appended to file name (ex. c:\newfile.txt -> c:\archive\newfile_20120116.txt) When in doubt, read the documentation. If the destination folder doesn't already exist, you need to create it first. swapped 3) confirm that the file got copied and then popup that file was copied, and upon clicking yes open the file with the default program that handles the file Check if the file exists and display a MsgBox if it does. For opening the file with the default program, you have to read the command registered as the default action for the file's extension from the registry.
|
|
|
|
swapped
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 1/16/2012
-
Status: offline
|
Re:vbs to rename/copy/organize files + context menu
Wednesday, January 18, 2012 4:09 PM
( permalink)
59cobalt swapped 1) have the execution of this vbs be from context menu (right click menu) on select file types See this post for a description of the general concept. swapped 2) upon execution do the following to file i clicked on, copy into current folder\archive with a datetime code appended to file name (ex. c:\newfile.txt -> c:\archive\newfile_20120116.txt) When in doubt, read the documentation. If the destination folder doesn't already exist, you need to create it first. swapped 3) confirm that the file got copied and then popup that file was copied, and upon clicking yes open the file with the default program that handles the file Check if the file exists and display a MsgBox if it does. For opening the file with the default program, you have to read the command registered as the default action for the file's extension from the registry. thanks for the helpful reply. I think the context menu (with handling wha folder i'm in and what the file name is) and the registry lookup for the file's extension are things i think i will struggles with. everything else i have done at some point here.
|
|
|
|