Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: FIle Directory Problem Driving me crazy.

by repellent (Priest)
on Sep 09, 2011 at 06:45 UTC ( [id://925022]=note: print w/replies, xml ) Need Help??


in reply to FIle Directory Problem Driving me crazy.

    I have tried moving it up a DIR ..
    # MOVE ORIGINAL TO ../Done/M-archiv print "move $originalfilenamequantity 1.txt \n"; system("move $originalfilenamequantity ..");

All 4 of the above I gathered from the OP. I can't tell your intentions from your code comment and print statement.

Some advice: it's best to use absolute paths when performing system. If you use relative paths like "..", then that is relative to the current working directory of the spawned system process (most likely the dir where you launched your program, which may change). Maybe something like this:
my $dest = "$currentdir/.."; # means Z:/SALESD~1/LOGS/ORDERS my $cmd = "move $originalfilenamequantity $dest"; system($cmd) == 0 or warn("Failed: $cmd");

Update: Correction by anonymonk.

Replies are listed 'Best First'.
Re^2: FIle Directory Problem Driving me crazy.
by Anonymous Monk on Sep 09, 2011 at 06:56 UTC

    system($cmd) or warn("Failed: $cmd");

    See system and  0 == system... or warn "Failed...";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://925022]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found