Need Help Creating a Task!

Discuss RoboTask here
Post Reply
rafalote
Posts: 2
Joined: Thu Nov 25, 2004 5:02 pm

Need Help Creating a Task!

Post by rafalote »

I have recently discovered this program and it looks fantastic.  If this program can do what I want, it will be a definate buy.  I will try to be as specific as possible.
When one file is placed into a specific folder (folder is currently empty), I need for my task to do the following:
[1]. Create a new folder at that location. (I did this part)
[2]. Rename that folder to the exact name of the file. (Need Help!!!)
[3]. Move that file into that folder. (I can do this)
Please let me know if any can help!
Rafalote
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Need Help Creating a Task!

Post by Oleg »

Rename that folder to the exact name of the file. (Need Help!!!)
You can't create (or rename) a folder with same name as file. Operating system (Windows) will not allow you to do it. But you can use the file name as part of folder name. In order to extract file name (or other parts) from full name you can use macrofunctions:
ExtractFileDrive
ExtractFileExt
ExtractFileName
ExtractFileNameNoExt
ExtractFilePath
ExtractFilePathNoDrive

For example:
create folder "FLD_{ExtractFileNameNoExt({FileName})}"
rafalote
Posts: 2
Joined: Thu Nov 25, 2004 5:02 pm

Need Help Creating a Task!

Post by rafalote »

Thanks for the quick response, Oleg!  However, when I tried to used your script the folder was renamed to FLD_{Filename}.  The file is called Data Entry.xls.  I am aware of Windows limitations.  If the folder I created can be renamed to Data Entry (No Extention) that would be great.
Please excuse my ignorance.  I learn very quickly, however, I would need a functioning example to see.  If you can create a simple script that I could follow the logic step by step that would be great.
Thanking you in advance!
Rafalote
Post Reply