Sponsored Content
Special Forums Windows & DOS: Issues & Discussions what is the DOS equivalent of alias command? Post 302304495 by ilan on Monday 6th of April 2009 03:25:20 PM
Old 04-06-2009
Hello Milhan,

on top of what Pederabo has suggested.., the oter easy way to get working similar to aliases are using a set command..


C:\Documents and Settings\ilango\test>set dira=dir /A

C:\Documents and Settings\ilango\test>dir
Volume in drive C has no label.
Volume Serial Number is 548F-C2AD

Directory of C:\Documents and Settings\ilango\test

04/06/2009 12:13 PM <DIR> .
04/06/2009 12:13 PM <DIR> ..
04/06/2009 12:13 PM 4 normal.txt
1 File(s) 4 bytes
2 Dir(s) 6,269,435,904 bytes free

C:\Documents and Settings\ilango\test>%dira%
Volume in drive C has no label.
Volume Serial Number is 548F-C2AD

Directory of C:\Documents and Settings\ilango\test

04/06/2009 12:13 PM <DIR> .
04/06/2009 12:13 PM <DIR> ..
04/06/2009 12:13 PM 4 hidden.txt
04/06/2009 12:13 PM 4 normal.txt
2 File(s) 8 bytes
2 Dir(s) 6,269,403,136 bytes free

C:\Documents and Settings\ilango\test>


In teh above example, i made simiar to alias - dira to be executed as dir /A, only thing is you will have to use it with percentages.. as in %dira%

/ilan
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

SQL Spool equivalent command in DOS

This question maybe in the wrong category but I'm posting here due to urgency. In DOS is there a command to perform a similar function to spool command in SQL or Script command in UNIX? I want to print all command line output to a file but I don't want to use the echo command for each line. ... (2 Replies)
Discussion started by: stevefox
2 Replies

2. UNIX for Dummies Questions & Answers

DOS command for ps

I have navigated every DOS and UNIX FAQ to find the DOS equivalent of the UNIX ps command (ps -f would be even better) but all listings of DOS<>UNIX commands do not have it (they all have the same basic commands listed). DOS must have a way of detecting running processes and TSRs. mem /c is the... (7 Replies)
Discussion started by: dancingfool
7 Replies

3. UNIX for Advanced & Expert Users

Command equivalent to DOS mode for SCO 5.0.6

I need to set the serial port attributes to 9600,7,E,1 in order to read and write data to it from within a Foxpro program. Unfortunately there is no function in Foxpro to set the line attributes, only open. close read and write. Stty only works on the stdout and stdin in this release, and the... (3 Replies)
Discussion started by: jgt
3 Replies

4. UNIX for Dummies Questions & Answers

Unix equivalent of DOS set

Hi all, what is the equivalent command of the DOS set that lists all the environment variable and their values? Xavier. (3 Replies)
Discussion started by: xxavier
3 Replies

5. Shell Programming and Scripting

Command for unix to dos conversion

Dear All Could you please advice how do we convert a unix file to dos I know one command,ux2dos, which somehow does not work to give desired output Inputs on this is appreciated Thanks, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

6. Windows & DOS: Issues & Discussions

dos/intel unix command equivalent

In Unix I can use command line to do a find for files older than so many days and remove them. I can also capture the date to see if its a saturday and do something different. Are there any dos/intel command line equivalent commands to do this on a windows 2003 server? This is from an... (6 Replies)
Discussion started by: MizzGail
6 Replies

7. AIX

smitty equivalent command line command

i know after you do something in smitty via the gui, you can click something in smitty that will show you how to do the same thing via the command line, (not using the gui) can anyone tell me how (2 Replies)
Discussion started by: asyed123
2 Replies

8. Windows & DOS: Issues & Discussions

DOS Equivalent of UNIX Command

Hi, The title of this post is a little vague but I couldn't think of what to call it. In Unix you can perform the following command ftp -v IPADDRESS <<END put FILE END In a DOS command prompt, is it possible to do the same kind of thing that the "<<END" does? So for example, ... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

9. UNIX for Dummies Questions & Answers

Create the equivalent of the command WC

hi all, i'm trying to do this exercise, i want to create a script that can substitute WC command in unix, can someone help me? (11 Replies)
Discussion started by: Marina2013
11 Replies

10. Shell Programming and Scripting

Convert for command from DOS to SHELL

Well, this command has served me quite well under DOS for %%X in (*.txt) do COMMAND however in linux it just outputs: "./install.sh line 1: '%%x': not a valid identifier. Ideas ? Thanks in advance (2 Replies)
Discussion started by: pasc
2 Replies
File::Fu(3pm)						User Contributed Perl Documentation					     File::Fu(3pm)

NAME
File::Fu - file and directory objects SYNOPSIS
The directory constructor: use File::Fu; my $dir = File::Fu->dir("bar"); print "$dir "; # 'bar/' my $file = $dir + 'bar.txt'; print "$file "; # 'bar/bar.txt' my $d2 = $dir % 'baz'; # 'barbaz/' my $d3 = $dir / 'bat'; # 'bar/bat/' my $file2 = $dir / 'bat' + 'foo.txt'; # 'bar/bat/foo.txt' The file constructor: my $file = File::Fu->file("foo"); $file->e and warn "$file exists"; $file->l and warn "$file is a link"; warn "file is in ", $file->dir; ABOUT
This class provides the toplevel interface to File::Fu directory and file objects, with operator overloading which allows precise path composition and support for most builtin methods, as well as creation of temporary files/directories, finding files, and more. The interface and style are quite different than the perl builtins or File::Spec. The syntax is concise. Errors are thrown with croak(), so you never need to check a return code. Constructors The actual objects are in the 'Dir' and 'File' sub-namespaces. dir my $dir = File::Fu->dir($path); See "new" in File::Fu::Dir file my $file = File::Fu->file($path); See "new" in File::Fu::File Class Constants tmp Your system's '/tmp/' directory (or equivalent of that.) my $dir = File::Fu->tmp; home User's $HOME directory. my $dir = File::Fu->home; program_name The absolute name of your program. This will be relative from the time File::Fu was loaded. It dies if the name is '-e'. my $prog = File::Fu->program_name; If File::Fu was loaded after a chdir and the $0 was relative, calling program_name() throws an error. (Unless you set $0 correctly before requiring File::Fu.) program_dir Returns what typically corresponds to program_name()->dirname, but just the compile-time cwd() when $0 is -e/-E. my $dir = File::Fu->program_dir; Class Methods THIS_FILE A nicer way to say __FILE__. my $file = File::Fu->THIS_FILE; cwd The current working directory. my $dir = File::Fu->cwd; which Returns File::Fu::File objects of ordered candidates for $name found in the path. my @prog = File::Fu->which($name) or die "cannot find $name"; If called in scalar context, returns a single File::Fu::File object or throws an error if no candidates were found. my $prog = File::Fu->which($name); Temporary Directories and Files These class methods call the corresponding File::Fu::Dir methods on the value of tmp(). That is, you get a temporary file/dir in the '/tmp/' directory. temp_dir my $dir = File::Fu->temp_dir; temp_file my $handle = File::Fu->temp_file; Subclassing You may wish to subclass File:Fu and override the dir_class() and/or file_class() class methods to point to your own Dir/File subclasses. my $class = 'My::FileFu'; my $dir = $class->dir("foo"); See File::Fu::File and File::Fu::Dir for more info. See Also File::Fu::why if I need to explain my motivations. Path::Class, from which many an idea was taken. File::stat, IO::File, File::Spec, File::Find, File::Temp, File::Path, File::Basename, perlfunc, perlopentut. AUTHOR
Eric Wilhelm @ <ewilhelm at cpan dot org> http://scratchcomputing.com/ BUGS
If you found this module on CPAN, please report any bugs or feature requests through the web interface at <http://rt.cpan.org>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. If you pulled this development version from my /svn/, please contact me directly. COPYRIGHT
Copyright (C) 2008 Eric L. Wilhelm, All Rights Reserved. NO WARRANTY
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-05-13 File::Fu(3pm)
All times are GMT -4. The time now is 05:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy