Solved

scripting

Posted on 2002-06-20
14
180 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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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 100 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Loss of RDP via youngzsoft.com/cn 4 218
website 1 297
windows 2000 image 3 121
Windows 2000 unable to connect to the internet by ethernet cable 14 59
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…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now