1 Reply Latest reply on Sep 8, 2016 10:18 AM by 1markf

    Uploading file names that will change

    devans

      Hello,

      We are looking to create an upload where the file name will change at the beginning every time.  Example ddmmyyyyEmployeeFile.csv . Is it possible to set up the upload in this format so we don't have to change what it is looking for each time?

      Thank you!

        • Re: Uploading file names that will change
          1markf

          A bug in v16.2.0.328 assumes that "Remote File or Folder" must be a Folder, at-least where "Local File or Folder" is a wildcard "C:\...\*". Thus you cannot substitute Scheduler's System Variables here. This may not apply to a static filename?

           

          Until SolarWinds acknowledge and fix this bug, then my work-around was a routine Script for a custom watched Folder that moves files into Voyager's watched folder whilst renaming them. Be aware of User Permissions. I used VBScript, but you could use a Batch file:

           

          @echo off

          set SOURCE_PATH=D:\Folder1

          set TARGET_PATH=D:\Folder2

          for %%F in ("%SOURCE_PATH%\*") do call :1 "%%F"

          goto :EOF

          :1

          set TAG=20%DATE:~-2%%DATE:~3,2%%DATE:~0,2%

          set TARGET_FILE=%TARGET_PATH%\%TAG%%~nx1

          ::: If locked then Move aborts

          if not exist "%TARGET_FILE%" move "%~1" "%TARGET_FILE%"