Hi !!!
This script must open folder, and I must view empty opened folder...!!!
I work in "Far manager".
Now this script only create folder... -
-
@rem = '--*-Perl-*--
-
@echo off
-
if "%OS%" == "Windows_NT" goto WinNT
-
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
-
goto endofperl
-
:WinNT
-
perl -x -S %0 %*
-
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
-
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
-
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
-
goto endofperl
-
@rem ';
-
#!/usr/bin/perl
-
use warnings;
-
use strict;
-
use File::Path;
-
use Cwd;
-
use File::Copy;
-
use File::Spec::Functions;
-
#hardcoded
-
my $FP = 'Y:\graphics_qc';
-
my $TP = 'Y:\plot_db';
-
my ($from_file, $to_file) = ($ARGV[0], $ARGV[0]);
-
my $cwd = `cd`;
-
chomp $cwd;
-
my ($from_dir, $to_dir) = ($cwd, $cwd);
-
#rename dir part
-
$to_dir =~ s/^\Q$FP\E/$TP/;
-
mkpath($to_dir);
-
chdir $to_file;
-
exit 0;
-
-
__END__
-
:endofperl
-
-
Regards !!!
Viki
8 6382
If you want to physically open the folder (get the view of folder contents), use: -
system("start $to_dir"); # this will open folder in win explorer
-
Else, if you want to open the folder to read its contents(files) inside Perl script, use opendir() command. -
opendir(DIR,"$to_dir") or die "failed to open:$!";
-
while(<DIR>) { # read through contents of folder
-
-
Hi !!!
Thank you for answer !!! - 1. system("start $to_dir"); # this will open folder in win explorer
I need the same opening folder in "Far manager".
:)
Regards !!!
Viki
If you want to physically open the folder (get the view of folder contents), use: -
system("start $to_dir"); # this will open folder in win explorer
-
Else, if you want to open the folder to read its contents(files) inside Perl script, use opendir() command. -
opendir(DIR,"$to_dir") or die "failed to open:$!";
-
while(<DIR>) { # read through contents of folder
-
-
numberwhun 3,509
Recognized Expert Moderator Specialist
I don't know about anyone else, but I have no idea what "Far Manager" is and have never heard of it. If it is an external program, then that is up to you to figure out. Otherwise, please explain what your needs are a little clearer.
Regards,
Jeff
I do not know about "Far Manager" either. However, if you know of a method to open a file/folder in Far manager through command prompt, then you should be able to do it using the same command inside system() in your script.
KevinADC 4,059
Recognized Expert Specialist
I have a funny feeling he means File Manager.....
Icecrack 174
Recognized Expert New Member
hey guys,
http://www.farmanager. com/
if its in the default then its should be - system(`c:\program files\far\far.exe`);
KevinADC 4,059
Recognized Expert Specialist
looks like the old DOS interface I used to work with more than 15 years ago.
Icecrack 174
Recognized Expert New Member
just to help this fella out i thought ill put in some command line argv - /? This help.
-
/a Disable display of characters with codes 0 - 31 and 255.
-
/ag Disable display of pseudographics characters.
-
/8 Forces FAR to work in ANSI (non-Unicode) console.
-
/e[<line>[:<pos>]] <filename>
-
Edit the specified file.
-
/i Set small (16x16) icon for FAR console window.
-
/p[<path>]
-
Search for "common" plugins in the directory, specified by <path>.
-
/co Forces FAR to load plugins from the cache only.
-
/rc Restore console windows settings upon exiting FAR.
-
/u <username>
-
Allows to have separate settings for different users.
-
/v <filename>
-
View the specified file. If <filename> is -, data is read from the stdin.
-
/x Disable exception handling.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Yuri Vorontsov |
last post by:
Hallo!
We have troubles (post XP SP2) to open local folders from the web application:
- the web application allows users to select a local file (input type=file)
- the system DOES NOT upload the file but stores the path to the folder containing this file into a
database.
- the path to the local folder is linked as <a href=file:///blablabla/folder>Open folder</a>
- we used to be able to open the folder by clicking on the link above but...
|
by: lauren quantrell |
last post by:
Is there a way to open the MS Outlook address book using VBA and then
be able to do something with the return value?
I want users to click an icon to open the Outlook address book then
when an address is selected, populate an Access field with the address.
Is this remotely possible?
Thanks,
lq
|
by: Goober |
last post by:
I have a dotnet web app that opens & works fine.
There's another application on the same server, in a folder below the web
application. Both web apps are set up as virtual directories there and both
work on the server.
I am preparing to take ownership of the new project, and have tried to open
it, but get the following message when I try to open it:
"Unable to open web project 'myproject'. The file path
|
by: Kenneth P |
last post by:
Hi,
I've had a hd crash (with proper data backup) and I wonder what way would be
the best way to set up an old project with all code from a backup hd in a new
vs.net2003 environment?
TIA
Kenneth P
|
by: santel_helvis |
last post by:
Hi there,
I wanna open the folder using asp.net. I am using anchor link to do
that. But in href part how shall I give the location. Anyone plz help
me out.
Thanks in advance
| |
by: Aaron |
last post by:
I have two imagebuttons in my asp.net (I'm using vb.net) application. I
need one of them to open a folder and one to open a file within the
aforementioned folder. I am not sure which class exposes the filesystem. I
do not want a "File Open" dialog box, I need the actual folder and file to
open. The path is in UNC.
For example:
Imagebutton1 should open the folder \\server1\documents\resumes
Imagebutton2 should open the file...
|
by: g4356 |
last post by:
Hi, A new baby question:
I downloaded a dot net project and saved it to my local disk. When I tried
to open this project, a message popped up:
"Unable to open web project "test/myfirstweb"/ The file path
"D:\dnet\webproj\myfirstweb\home" does not correspond to the URL
'http://localhost:/test/myfirstweb'. The two need to map to the same server
location.
HTTP Error 404:Object not found".
|
by: Niyazi |
last post by:
Hi,
I created application that store the data in SQL SERVER that reside on
network. The client also use this application to access the resources
provided with application. But is the client want to register new customer or
companies they will enter the information in Windows Form and the program
automaticaly creates the WORD document under specific folder under
application path. Once the empty word file created than ask user if they want...
|
by: jonathandrott |
last post by:
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
|
by: Andy_Khosravi |
last post by:
I just recently changed my database that I'm running from a monolithic
DB to a split FE/BE. The front end resides on the client machine and
the BE resides on a network drive. I'm experimenting with a utility
developed by Tony Toews to handle the distribution and subsequent
updates of the software. I'm having some trouble with the overall
upgrade process I've implemented, and I'm hoping one of you may have
an idea how to go about fixing...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |