Solved

scripting

Posted on 2002-06-20
14
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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…
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 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