Hello YellowJackets,
Welcome to the Monastery.
Can you provide us with a sample of your code between code tags?
Update: I just noticed on your command:
copy ($filename, archive\\$archiveFileName);
Why you are using the double backslash? what type of operating system are you running the script (WindowsOS or LinuxOS)? I am asking because the slash can be different.
Update2: Basic troubleshooting from the module documentation:
copy("sourcefile","destinationfile") or die "Copy failed: $!";
Add the or die "Copy failed: $!" and you will know why the copying is failing.
Update3: Most likely the error is coming from the wrong path and also that you need to add double quotes. Last question. Why you are copying a file name $filename to another location e.g. archive\\$archiveFileName? I would assume you want something like that?
copy($archiveFileName, "archive\\$archiveFileName") or die "Copy failed: $!"
Looking forward to your update. BR / Thanos
In reply to Re: copy isn't working
by thanos1983
in thread copy isn't working
by YellowJackets
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |