Script to move all files in current directory

W

Wowbagger

I have a Microsoft Natural 4000 ergonomic keyboard that has five
programmable function buttons that can be assigned to a particular script.

I need a script that will move all of the files in the currently active
directory window (not in DOS), regardless of actual path (but will be on my
local machine) to another directory on the server. This script will be
called by pressing one of these customizable buttons. I know how to do this
in DOS, but how do I call a script that references the directory currently
displayed in the active window?
 
K

Keith Miller MVP

If you want a script to act on the contents of an entire folder, I would suggest one of two
approaches:

1) A standalone script which prompts the user to select the folder to be copied via
'BrowseForFolder':

http://msdn.microsoft.com/library/e...l/reference/objects/shell/browseforfolder.asp

2) a script that takes as a parameter a path to a folder -- added as a right-click option for folder
objects.

If you have scripting-specific questions, you'll have better luck asking in:

microsoft.public.scripting.vbscript

You'd probably also want to check out the Script Center:

http://www.microsoft.com/technet/scriptcenter/default.mspx
 
D

David Candy

For Each window in AllWindows
Maybe investigation will show the current window is returned first or some way of telling the active window?

--
--------------------------------------------------------------------------------------------------
Goodbye Web Diary
http://margokingston.typepad.com/harry_version_2/2005/12/thank_you_and_g.html#comments
=================================================
Keith Miller MVP said:
If you want a script to act on the contents of an entire folder, I would suggest one of two
approaches:

1) A standalone script which prompts the user to select the folder to be copied via
'BrowseForFolder':

http://msdn.microsoft.com/library/e...l/reference/objects/shell/browseforfolder.asp

2) a script that takes as a parameter a path to a folder -- added as a right-click option for folder
objects.

If you have scripting-specific questions, you'll have better luck asking in:

microsoft.public.scripting.vbscript

You'd probably also want to check out the Script Center:

http://www.microsoft.com/technet/scriptcenter/default.mspx

--
Good Luck,

Keith
Microsoft MVP [Windows XP Shell/User]


Wowbagger said:
I have a Microsoft Natural 4000 ergonomic keyboard that has five
programmable function buttons that can be assigned to a particular script.

I need a script that will move all of the files in the currently active
directory window (not in DOS), regardless of actual path (but will be on my
local machine) to another directory on the server. This script will be
called by pressing one of these customizable buttons. I know how to do this
in DOS, but how do I call a script that references the directory currently
displayed in the active window?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top