03-17-2013
In windows, shortcuts files are stored as .lnk files. You may write a simple VB script using TargetPath function to get the target path of .lnk files and then proceed with further processing. IMHO, instead of the "Shell Programming and Scripting" forum, you may post this question in the
Windows forum.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, hopefully this is a fairly simple Q&A.
I have a clean file list of approximately 180 filenames with no directory or slashes in front of the filename nor any extension or dot ".". I would like to read from this list, find these files recursively down through directory trees, copy the files... (1 Reply)
Discussion started by: fxvisions
1 Replies
2. Shell Programming and Scripting
Hi
I am a shell-script newbie and am looking to synchronize certain files in two directory structures.
Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over.
I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
I'm generating timestamps (file creation timestamps) for all the files in a directory. I need to compare all the timestamps.
for example if i have 4 files and their timestamps are 20091125114556,
20091125114556,20091125114556,20091125114556 respectively.
I need to differentiate... (1 Reply)
Discussion started by: RSC1985
1 Replies
4. Shell Programming and Scripting
Hi,
I am on a windows system that receives files from differnet host, I have to find the count of files that we receive between specific time.
The code below is what i use to count the number of file, how do i change this to count files between specfic time
opendir ( DIR, $dir ) || die... (1 Reply)
Discussion started by: amit1_x
1 Replies
5. UNIX for Dummies Questions & Answers
Mi question is how can you copy only de three of directory and not the files in it.
Only a need the three of directorys not the files (6 Replies)
Discussion started by: enkei17
6 Replies
6. UNIX for Dummies Questions & Answers
Iam in the process of copying a directory with thousands of directories and files into a new directory.
I need to preserve permissions, owner, group, date and timestamps, everything.
Iam using AIX and would need help of writing the command whether it is cp-RP or cpio.
Apprecaite your... (3 Replies)
Discussion started by: baanprog
3 Replies
7. Shell Programming and Scripting
Hi Gents.
Please can you help me to solve a problem.
I have a long list of files, which I need to change the time stamp.
-r--r--r-- 1 geo2 geovect 47096216 Feb 8 10:40 00000009.segd
-r--r--r-- 1 geo2 geovect 47096216 Feb 8 10:40 00000010.segd
-r--r--r-- 1 geo2 geovect 47096216 Feb ... (11 Replies)
Discussion started by: jiam912
11 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have the following folder structure:
Folder6100/Data
Folder6100/Data
Folder6120/Data
Folder6120/Data
Folder6140/Data
Folder6140/Data
Folder6160/Data
Folder6160/Data
Folder6180/Data
Folder6180/Data
Folder6200/Data
Folder6220/Data
Folder6240/Data
Folder6260/Data... (2 Replies)
Discussion started by: alex2005
2 Replies
9. Shell Programming and Scripting
Hi,
I have been working on the error Log script, where errors are pulled from server.
I need to pull the data of the error logs between two dates & time, for example :
22/12/2014 20:00:00
22/12/2014 22:00:00
Whatever error have came during this duration.
Now the question is the record... (6 Replies)
Discussion started by: amitgpta90
6 Replies
10. Shell Programming and Scripting
Hi,
I have a serverA with Directory "/opt/app/myfiles" which is 8.5GB with more than 40000 files and 45 folders in it.
I wish to transfer the folder "/opt/app/myfiles" tree structure with all the sub-directories and skip all files to another serverB.
I would appreciate a command that... (4 Replies)
Discussion started by: mohtashims
4 Replies
REALPATH(3) 1 REALPATH(3)
realpath - Returns canonicalized absolute pathname
SYNOPSIS
string realpath (string $path)
DESCRIPTION
realpath(3) expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input $path and returns the
canonicalized absolute pathname.
PARAMETERS
o $path
- The path being checked.
Note
Whilst a path must be supplied, the value can be blank or NULL In these cases, the value is interpreted as the current
directory.
RETURN VALUES
Returns the canonicalized absolute pathname on success. The resulting path will have no symbolic link, '/./' or '/../' components.
realpath(3) returns FALSE on failure, e.g. if the file does not exist.
Note
The running script must have executable permissions on all directories in the hierarchy, otherwise realpath(3) will return FALSE.
Note
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results
for files which are larger than 2GB.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Prior to this release, if only the last $path |
| | component did not exist, realpath(3) would not |
| | fail on *BSD systems. realpath(3) now fails in |
| | this case. |
| | |
| 5.2.1 | |
| | |
| | Prior to this version, realpath(3) returned |
| | FALSE if $path is an empty string or NULL. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
realpath(3) example
<?php
chdir('/var/www/');
echo realpath('./../../etc/passwd');
?>
The above example will output:
/etc/passwd
Example #2
realpath(3) on Windows
On windows realpath(3) will change unix style paths to windows style.
<?php
echo realpath('/windows/system32');
?>
The above example will output:
C:WINDOWSSystem32
SEE ALSO
basename(3), dirname(3), pathinfo(3).
PHP Documentation Group REALPATH(3)