Assuming XP.
This must be done in a Batch File (.bat).
The first script is your exact requirement. The second script puts the timestamp in front of the filename which is more readable.
Just for interest, there are techniques available from Excel if you don't mind a bit of VB programming. For example (but do check your Excel and Windows version and re-search the KB).
is it possible to see what is in a dds tape?
like in dos, we can write dir a: to see the contents of it?
thanks
PS : actually, i came from a DOS background. so most of the time, i will try to relate unix to dos. of course, dos never came close to unix. but unix is like many instances of dos... (3 Replies)
Hi
I have a dos batch file in window server where I call a cmd command for creating some db.
this cmd commad is located in e:\data\abcd\xyz.cmd.
Now I call this batch file from unix ssh.sh but my access point is D in window server here I want to change the dos prompt to e:\data\abcd.
in... (3 Replies)
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
How do I define a particular dir in front of PATH variable and then run some job and then at the end of job SET the PATH variable to original?
in a script, WILL something like this work:
ORIG_PATH=$PATH
export PATH=/dir1/dir2:$PATH
RUN SOME JOBS .....
unset PATH
EXPORT... (2 Replies)
Hello ;
I have a problem running some script on dos .
when i run :
C: ls /temp
ls: cannot access /temp: No such file or directory
but when i run
C: ls \temp
windriver backup remotebackup
also when i run
C: ls temp
windriver backup remotebackup
The... (4 Replies)
:confused:
Hello,
Is there any way to use the dir command / some DOS Script to select only first file of similar pattern of files in a direcotory and rename it for example, one directory has 5 files
abc_1005.txt
abc_5256.txt
abc_2001.txt
abc_2003.txt
abc_3006.txt
by use script I would... (2 Replies)
Hi,
I need to store all the files in a directory to a text file with its full path.
The example below can explain:
./File1.txt
./File2.txt
./Folder1/File11.txt
./Folder1/File12.txt
./Folder1/Folder11/File111.txt
./Folder2/file21.txt
:
:
The ls -R1 command won't give the result as... (5 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
lyang0@lyang0-OptiPlex-755:~$ ./test.sh
.
lyang0@lyang0-OptiPlex-755:~$ cat test.sh
#!/bin/bash
echo `dirname $0`
lyang0@lyang0-OptiPlex-755:~$ pwd
/home/lyang0
it doesn't get "/home/lyang0" and only when run /home/lyang0/test.sh it will get, but how can I do, then it can get the real... (8 Replies)
Discussion started by: yanglei_fage
8 Replies
LEARN ABOUT DEBIAN
moosex::types::path::class
MooseX::Types::Path::Class(3pm) User Contributed Perl Documentation MooseX::Types::Path::Class(3pm)NAME
MooseX::Types::Path::Class - A Path::Class type library for Moose
SYNOPSIS
package MyClass;
use Moose;
use MooseX::Types::Path::Class;
with 'MooseX::Getopt'; # optional
has 'dir' => (
is => 'ro',
isa => 'Path::Class::Dir',
required => 1,
coerce => 1,
);
has 'file' => (
is => 'ro',
isa => 'Path::Class::File',
required => 1,
coerce => 1,
);
# these attributes are coerced to the
# appropriate Path::Class objects
MyClass->new( dir => '/some/directory/', file => '/some/file' );
DESCRIPTION
MooseX::Types::Path::Class creates common Moose types, coercions and option specifications useful for dealing with Path::Class objects as
Moose attributes.
Coercions (see Moose::Util::TypeConstraints) are made from both 'Str' and 'ArrayRef' to both Path::Class::Dir and Path::Class::File
objects. If you have MooseX::Getopt installed, the Getopt option type ("=s") will be added for both Path::Class::Dir and
Path::Class::File.
EXPORTS
None of these are exported by default. They are provided via MooseX::Types.
Dir, File
These exports can be used instead of the full class names. Example:
package MyClass;
use Moose;
use MooseX::Types::Path::Class qw(Dir File);
has 'dir' => (
is => 'ro',
isa => Dir,
required => 1,
coerce => 1,
);
has 'file' => (
is => 'ro',
isa => File,
required => 1,
coerce => 1,
);
Note that there are no quotes around Dir or File.
is_Dir($value), is_File($value)
Returns true or false based on whether $value is a valid Dir or File.
to_Dir($value), to_File($value)
Attempts to coerce $value to a Dir or File. Returns the coerced value or false if the coercion failed.
DEPENDENCIES
Moose, MooseX::Types, Path::Class
BUGS AND LIMITATIONS
If you find a bug please either email the author, or add the bug to cpan-RT <http://rt.cpan.org>.
AUTHOR
Todd Hepler "<thepler@employees.org>"
LICENCE AND COPYRIGHT
Copyright (c) 2007-2008, Todd Hepler "<thepler@employees.org>".
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
perl v5.10.1 2008-07-09 MooseX::Types::Path::Class(3pm)