I have run into a weird issue with moving files. When attempting to move a file from one directory to another.
With in my file system I have the folders:
/mnt/fds-phx/docTmp/coded/ (the from folder)
/mnt/fds-phx/plsTrans/98E98657-D4A3-6B6B-EF2990B199D75814/tmp (the to folder)
Now the issue that I am having is when I try to move a file from /mnt/fds-phx/docTmp/coded/ to the directory /mnt/fds-phx/plsTrans/98E98657-D4A3-6B6B-EF2990B199D75814/tmp the file is moved, but the file is moved to /mnt/fds-phx/plsTrans/98E98657-D4A3-6B6B-EF2990B199D75814 instead of /mnt/fds-phx/plsTrans/98E98657-D4A3-6B6B-EF2990B199D75814/tmp
When using the command line to move the file it works perfectly fine. When I use just a string instead of a dynamic string, the move works perfectly fine.
Here is my updated code.
# read trans barcode
$primer = Util::Util::trim(Util::Util::fileDecode($transFile))
+;
# set transaction folder path
my $transPath = $wDir . "plsTrans/" . $primer . "/tmp/.";
system("mv $transFile $transPath");
if(-d $transPath){
system("mv $transFile $transPath");
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.