file date modified

Post variable and regex related tips, questions.

Postby melvin » Tue Mar 24, 2009 6:19 am

1) what are the names of your 12 subfolders? examples of a couple will do.
2) the names of the files are arbitrary or do they have the month attached to them?
3) is this your main folder structure?

main folder
----subfolder1
----subfolder2
....
...
----subfolder12
file1
file2
file3
...
...
file12345
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Postby Tech Support » Tue Mar 24, 2009 2:57 pm

You need to create a dirloop task and a copy task (move option), and use a nested variable in the copy task.

You do not need to manually create folders. The copy task will dynamically detect the file month and create a folder with that month (if it does not exist) and copy the file there.

dirloop task:
task title = dirloop
directory = c:\test
option = run task if file exists

copy task:
move option
source dir = c:\test
target dir = c:\test\$%FILE::DATE::YYpp::NEST-dirLoop::CurrentFilepath-NESTEND%$
filename = $%dirLoop::CurrentFilename%$
Tech Support
Site Admin
 
Posts: 1279
Joined: Thu May 25, 2006 11:12 am

Postby Tech Support » Wed Mar 25, 2009 9:39 am

hmm. .. I tested above solution to run without any problems.

what is the error in the debug/task log corresponding to the failure:
moveBYMonth::CopyFailed = 1
copy/paste snippets of tasklog corresponding to failure.

Also, copy and paste your exact settings below where x is marked.

dirloop task:
task title = ...
directory = x
option = run task if file exists
task to run = moveBYMonth

copy task:
move option
source dir = x
target dir = x
filename = x
Tech Support
Site Admin
 
Posts: 1279
Joined: Thu May 25, 2006 11:12 am

Postby Tech Support » Thu Mar 26, 2009 11:40 am

Failed to copy: C:\BackUpTests\folder1\200810 \RXpdf-30SEP08.zip

there seems to be a space between 810 and \R
so check your target directory field and remove any space at the end.
hopefully that should help.
Tech Support
Site Admin
 
Posts: 1279
Joined: Thu May 25, 2006 11:12 am


Return to Variables and Regular Expressions

Who is online

Users browsing this forum: No registered users and 1 guest

cron