Solved

scripting

Posted on 2002-06-20
14
185 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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 series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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