Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

scripting

Posted on 2002-06-20
14
Medium Priority
?
190 Views
Last Modified: 2010-04-13
Where do I go to learn about scripting? I want to automate some functions that can be done in Windows Explorer such as:
1.     change directory
2.     select all files in a directory
3.     change their attributes
4.     copy files
5.     map a network drive
6.     unmap a network drive

Thanks,
Stephen L. Showler
0
Comment
Question by:SShowler
  • 6
  • 4
  • 3
  • +1
14 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 7097000
0
 
LVL 2

Expert Comment

by:tobyk
ID: 7097591
I especially like winscriptingsolutions.com as mentioned before.

One of the columnists there has written an excellent book on Win32 scripting with Perl and has lots of free info and scripts on his site. http://www.roth.net/

Also given the usefulness of scripting and its cheap price i found it worthwhile actually spending some money and buying "Windows Admin Scripting Little Black Book"




0
 
LVL 7

Expert Comment

by:jmiller47
ID: 7097600
The MS Scripting home is msdn.microsoft.com/scripting

Although, the ones Sysexpert mentioned are all great. I use most of them all the time. He has some excellent ones there.

I will try to post a list of books that I used and still do use for all scripting such as VBScript, JScript, WSH, Shell.

I hope this helps!

0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 

Author Comment

by:SShowler
ID: 7101921
WOW! Usually when I ask for documentation, I get very little response. The person wants to solve the question directly and not try and teach you so you can think for yourself in the future.
What you have done is great. I appreciate it, but overwhelmed where to start. I assume you can do a lot in lots of areas with scripting. Where would you suggest I begin to get off of square one dealing with files as you do in Windows Explorer.
How about some snippets of code in the areas I am currently interested in. If more points are needed for this request, please make a suggestion. I have no problem with that. I would be more than appreciative if someone could review my past questions and give me some guidelines on assigning points. My past experience in dealing with free forums is that your question posted rarely gets answered; or if it does, it’s by some idiot that has nothing better to do that waste his/her time in forums. Usually the answer is bullshit. The only success I’ve had in the past is with Microsoft pay per incident. That gets fairly expensive at $195 a pop. I’ve had great success with your service. I have no problems paying for help.
Thanks,
Stephen L. Showler
0
 
LVL 7

Expert Comment

by:jmiller47
ID: 7101972
Glad to help. Would you rather that we pointed you to a specific book or website that has the specific inforamtion you are looking for and has helped us in the past or just paste the code in here for you to use?
0
 

Author Comment

by:SShowler
ID: 7101979
Could I get both?

Stephen L. Showler
0
 
LVL 7

Expert Comment

by:jmiller47
ID: 7102043
I'm sure we can arrange that :)You should have most of what you need ovver the next day or two.
0
 
LVL 2

Expert Comment

by:tobyk
ID: 7102531
The question i have with regard to this is do you have any prefered program/language to do this with. The reason I ask is that although i wouldn't recommend it as a scripting language that is all stuff that could be done as a simple .cmd script.
0
 
LVL 7

Expert Comment

by:jmiller47
ID: 7102537
You can do this all in shell scripting. This is sometimes called batch sctipting, etc...

All the things you want accomplished can be done with Shell scripting... You don't need VBScript, JScript, etc...
0
 
LVL 7

Expert Comment

by:jmiller47
ID: 7102553
1.     change directory to tools
CD Tools

2.     select all files in a directory
3.     change their attributes to Read-only
ATTRIB -R *.* /S /D

4.     copy all files from c:\TOOLS to C:\NEW
COPY C:\TOOLS\*.* C:\NEW

5.     map a network drive
NET USE H: \\SERVER1\SHARE

6.     unmap a network drive
NET USE H: /D

If you need to know how to use a command, type the command and use the parameter /?
example: COPY /?
0
 
LVL 2

Expert Comment

by:tobyk
ID: 7102554
eg

1.     change directory

batch file or .cmd file with

cd %directoryname%

2.     select all files in a directory


3.     change their attributes

attrib %filename% or wildcard switches

4.     copy files

copy source destination

5.     map a network drive

net use drive_letter sharename
 

6.     unmap a network drive

net use drive_letter /d

still think other scripting as mentioned by the others is worth learning for admin purposes, login scripts etc
0
 
LVL 2

Expert Comment

by:tobyk
ID: 7102555
eg

1.     change directory

batch file or .cmd file with

cd %directoryname%

2.     select all files in a directory


3.     change their attributes

attrib %filename% or wildcard switches

4.     copy files

copy source destination

5.     map a network drive

net use drive_letter sharename
 

6.     unmap a network drive

net use drive_letter /d

still think other scripting as mentioned by the others is worth learning for admin purposes, login scripts etc
0
 

Author Comment

by:SShowler
ID: 7105166
OK, I think what you are telling me is that the old batch file technique is what to use. I thought maybe that had been improved through scripting. When I type help at the DOS prompt, I just see the old familiar commands.
Thanks,
Stephen L. Showler
0
 
LVL 7

Accepted Solution

by:
jmiller47 earned 400 total points
ID: 7105262
you dont have to use shell scripting. You can do this with VBScript and WSH also (among others) Shell scripting (cmd files) were mentioned earlier. Unless there is a problem with Shell scripting or limitations, it is the easiest to implement and use. VBScript is more powerful though.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question